We have PHP 5.2.6 deployed to c:\php and in that folder there is the php.ini file. On Windows, can a website override these settings similar to the way that apache has .htaccess? e.g.
DirectoryIndex index.php index.html <IfModule mod_php5.c> php_flag magic_quotes_gpc off php_flag register_globals off </IfModule> <IfModule mod_php4.c> php_flag magic_quotes_gpc off php_flag register_globals off </IfModule>
Update:
I was aware of ini_set() but wondered if there was a declarative way to do this in a configuration file in the website rather than in script.
I would recommend doing all you can to avoid changing r
egister_globalsto on as it’s a major security hole.But you can try using
init_set()to change the settings within your PHP code, although some settings cannot be changed once PHP has started running. (These are somewhat server dependent I believe.)