I've checked my PHP conf file (php.ini-dist) over and over again to make sure that register_globals is Off..... and it is. But, when I check the phpinfo() stuff it still shows register_globals as being On!!
Are there any other things I need to turn off in the conf file to get register_globals turned off?
I've also closed down and restarted Apach a couple to times just to make sure things get 'refreshed' but it makes no difference.
Cheeky Globals
Moderator: General Moderators
Eh?!? Now I'm confused.
Even though I've been editing the php.ini-dist file (found in the php folder) to add extensions to PHP the actual ini file that PHP is using is actually found in my windows directory........ but the extensions have been working fine even though I've been editing the wrong .ini file!?
I've changed the ini file (the one that PHP actually uses) to turn globals off and it now seems to work fine.
Does PHP use 2 ini files or am I just going mad?
Even though I've been editing the php.ini-dist file (found in the php folder) to add extensions to PHP the actual ini file that PHP is using is actually found in my windows directory........ but the extensions have been working fine even though I've been editing the wrong .ini file!?
I've changed the ini file (the one that PHP actually uses) to turn globals off and it now seems to work fine.
Does PHP use 2 ini files or am I just going mad?
placement
There are actually serveral a coulpe places where you can place your php.ini file. I believe it can be in the c:\windows directory or it can be in your root apache directory.
For me that is c:\apache\Apache2\php.ini
as the documentation says
phpScott
For me that is c:\apache\Apache2\php.ini
as the documentation says
with $SYSTEMROOT% usually being c:\windowsThe php.ini files is only searched in two places:
1) in your Apache installation directory (e.g. c:\apache\apache)
2)in your %SYSTEMROOT% directory.
phpScott
When you run phpinfo() check for the text
"Configuration File (php.ini) Path /etc/apache2/php.ini"
which shows that the configuration file is located at /etc/apache2/php.ini
If that is not there... Where it shows you the "configured-with" section look for --with-config-file-path .<-- that will show you the base directory of the configuration file location.
Now that you know where the php.ini file it's using is located; make sure that pesty little config option which is giving you trouble says register_globals=Off. restart your web server and the changes will take effect.
Hope that helped.
"Configuration File (php.ini) Path /etc/apache2/php.ini"
which shows that the configuration file is located at /etc/apache2/php.ini
If that is not there... Where it shows you the "configured-with" section look for --with-config-file-path .<-- that will show you the base directory of the configuration file location.
Now that you know where the php.ini file it's using is located; make sure that pesty little config option which is giving you trouble says register_globals=Off. restart your web server and the changes will take effect.
Hope that helped.