Click to See Complete Forum and Search --> : PHP upgrade broke passing variables


Dasher
10-06-2007, 09:34 PM
I have a PHP/MySQL program that I wrote. It is fairly crude in many ways, but has worked fine for a number of years. I ran it on a laptop with WinXP, PHP 4.3.3 and MySQL 3.23.x

I bought a new laptop with Windows Vista on it so I installed WAMP with Apache, MySQL 5.0.42 and PHP 5.2.3. (Old system was WinXP with ISS for the server). Any way portions of my program no longer work

My problems seem to revolve around passing variables to the same page, and also passing variables to another page. Part of the problems seems to be related to $_SESSION[vars] and the other problem area are when the variables are part of a URL using the ?var=xyz convention.

What I don't get is how these worked fine in an old version but are broken in the new versions. I am thinking it may be security related. The program pretty much ignores security issues, because it just runs on localhost. I know I haven't been too specific, but just starting to dig into this, and if I can grasp what the security related things that might break code that runs fine on 4.3.3 vs 5.0.xx might help.

scragar
10-06-2007, 09:38 PM
PHP5 doesn't have all of the functions that PHP4 offered(and some were renamed to reduce complexity), so your proberly better downgrading the version until they release a patch that allows for reverse compatibility of the functions/

NogDog
10-06-2007, 10:42 PM
My experience has been that the large majority of problems with PHP version upgrades have to do with configuration changes, not with actual functionality changes. I'll put 3:1 odds on your script depending upon register_globals being turned on, but the default setting for register_globals since PHP 4.2.0 has been off.

Dasher
10-09-2007, 11:09 PM
NogDog

Thanks, I was thinking the same thing, and modified php.ini way back when I first installed the WAMP server. But my program was still misbehaving. After reading your note I decided to take another look at. As it turns out I modified the wrong copy of php.ini. The WAMP server uses the one in Apache/bin and I modified the one in Apache/PHP. Phpinfo.php's configuration file path gave me the clue I overlooked before.