Click to See Complete Forum and Search --> : no variables in php 4.2.2 on w2k


lasseriis
08-28-2002, 08:05 AM
I've been trying to update my version of php (and apache), because up until a couple of days ago i was using 4.0.4.pl1 and that started to suck.
But whenever i install a newer version (4.2.2 or 4.2.1) php magically forgets all variables!
Using the sapi module or the cgi, makes no difference! If i execute this script:
<?php
$variable = 'This is a variable!';
echo 'Contents of variable: '.$variable;
?>

I get this:
Contents of variable:

PHP is no fun when you can set no variables, case anyone was wondering.

Have anybody had this problem before?

I tried resinstalling w2k entirely yesterday(the old install had been running since february 2000), but it made no difference......do i need to install some updates?

piersk
08-28-2002, 08:37 AM
Have you installed SP2 for Win2k? Dunno if it will make much difference, but it might be work a try...

lasseriis
08-28-2002, 08:43 AM
No, it's on a bare install, but I'm downloading the SP's as we speak, well writes, I already planned to install them, but I didn't think that they would make a difference.....

jerdo
08-28-2002, 12:03 PM
The service packs won't make a difference the problem here isn't Windows it's your PHP install. Did you use the zip or the exe to install it? Use the zip.

lasseriis
08-28-2002, 05:53 PM
I used the zip, and did everything it said in the install.txt....

btw. I've installed SP1 and SP2, it made no difference.....

trooper
08-31-2002, 07:48 PM
I'm not sure when it happened but the latest versions of php have the register_globals set to OFF.

That could be a reason why your PHP "forgets" all the variables

GM

kazer
09-02-2002, 04:02 AM
I just installed Apache 1.3.26 / MySQL / PHP 4.2.2 on a WinXP Pro box and i'm experiencing the same problem. Any insight would be helpful. I've attempted the suggestions located here thus far to no avail. I'll keep you posted if I figure anything out.

-Tyler

kazer
09-02-2002, 04:05 AM
Happily I can take that back. Switching global variables to on did the trick. (didn't restart apache!).
This is my first visit to this forum and it's proven -very- helpful to a problem I didn't think i'd be able to find any help on!

Thanks :)

-Tyler