Click to See Complete Forum and Search --> : 98 to XP


steward
05-08-2003, 12:17 AM
Apache 1.3.x PHP 4.2.3

Ran fine under 98... today I installed XP Pro and shuffled directories.

Apache seems ok: serves pages... php seems ok: displays phpinfo()... but my site (existing scripts) are a disaster.

Tons of the following messages. Must be something simple? Am I facing a re-download/re-install everything, or does anyone recognize which little piece of the puzzle has fallen out of place?

Many thanks.


Notice: Undefined variable: link in d:\manscat\config.php on line 76
Notice: Undefined index: Language in d:\manscat\config.php on line 255
Notice: Use of undefined constant HTTP_CLIENT_IP - assumed 'HTTP_CLIENT_IP' in d:\manscat\config.php on line 380
Connection to database failed: Can't connect to MySQL server on 'localhost' (10061)
etc etc

persia
05-08-2003, 04:11 AM
Hi.
find php.ini on your pc. then find register_globals in the file and replace it with the following line:
register_globals = On

Good Luck.

steward
05-08-2003, 11:23 AM
Thank you for the prompt reply.

Sensible suggestion.

But register_globals = On

Curious. Argh.

php.ini is in windows\system32, which is on the path. Wonder if there is a way to verify this ini file is getting picked up by php. I will see if there's a switch I can flip to recognize a difference.

Thanks. Anyone else?

steward
05-08-2003, 11:34 AM
Aha! Hit the send button too soon on that last reply.

Found a rogue copy of php.ini in c:\windows, getting picked up before the one I am working on in \windows\system32.

Register_globals was a difference between the two, your suggestion got me on the right track.

$ToYou = new blessing;
$ToYou .= Hey($blessing->Thanks);
send($ToYou);

hi-liter
05-09-2003, 12:50 PM
just an FYI;

" You should do your best to write your scripts so that they do not require register_globals to be on; Using form variables as globals can easily lead to possible security problems, if the code is not very well thought of."

- php.ini

http://www.php.net/manual/sv/security.registerglobals.php