Page 1 of 1
Cheeky Globals
Posted: Sat Oct 11, 2003 8:28 am
by Gen-ik
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.
Posted: Sat Oct 11, 2003 9:08 am
by volka
is this really the ini-file your webserver uses? phpinfo() tells you.
Are both global and local settings for register_global On?
Posted: Sat Oct 11, 2003 9:14 am
by Gen-ik
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?
Posted: Sat Oct 11, 2003 12:29 pm
by volka
it might, but usually it does not

placement
Posted: Sat Oct 11, 2003 4:22 pm
by phpScott
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
The 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.
with $SYSTEMROOT% usually being c:\windows
phpScott
Posted: Sat Oct 11, 2003 5:53 pm
by evilMind
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.