index.php?id=5 gives effect of index.php
Posted by: abdallahayek (2.50.136.---)
Date: December 19, 2012 06:54AM

Hi
I have installed WAMP recently, my scripts are written in PHP4. When i migrated my code to WAMP, the dynamic urls e.g. index.php?id=5 are not executing, the result of index.php is showing.
Can anyone help me in what is to be done in php.ini or httpd.conf in order to resolve this matter.

Thank you,
Abdallah.

Options: ReplyQuote
Re: index.php?id=5 gives effect of index.php
Posted by: RiggsFolly (---.as13285.net)
Date: December 19, 2012 10:02AM

Your PHP4 code probably relies on register_globals being on. If it is off none of the $_GET parameters will get converted to variable names and therefore your code will think no paramter was passed

Edit the php.ini file ( use the link on the wamp manager window. )

wampmanager -> PHP ->php ini

Look for the parameter register_globals

change it to this to turn it on

register_globals = On


Bounce Apache to activate this change, thats done by
wampmanager -> Apache ->Service -> Restart Service



Just a note, register_globals is deprecated in PHP 5.3 which means you will get warning messages in your php error log and Apache error log about that, they can safely be ignored. Also you will not be able to run this code on versions of PHP > 5.3

Hope this helps

Options: ReplyQuote


Sorry, only registered users may post in this forum.