Forum Moderators: coopster

Message Too Old, No Replies

Local php.ini for IIS - need help getting started

need to create local php.ini files for our Joomla site

         

pavlovapete

5:34 am on Oct 10, 2006 (gmt 0)

10+ Year Member



Hi,

I'd like to switch register_globals "off" with our shared hosting account on an IIS 6 machine and am hoping someone here can point me to some advice/resources.

Our host says register_globals will remain turned on for other sites that need it - I am keen to follow the Joomla security recommendations and turn it off for our site.

I understand that I can put a php.ini file in each folder on our site and it will be possible to override the settings in the main php.ini file but can't seem to find anything to help me get started - especially on an IIS machine.

Any pointers or advice would be greatly appreciated.

Thanks

Cheers

GoldFish

1:22 pm on Oct 10, 2006 (gmt 0)

10+ Year Member



You can also accomplish that by putting the following line in your .htaccess file:

php_flag register_globals off

Might be a bit easier. Good luck!

pavlovapete

1:26 am on Oct 11, 2006 (gmt 0)

10+ Year Member



Thanks Goldfish,

but we are on an IIS machine - I don't think .htaccess works with IIS.

Cheers

pavlovapete

1:52 am on Oct 12, 2006 (gmt 0)

10+ Year Member



OK got it sorted.

For future reference in case someone else needs this information.

If your windows 2003 host allows you to run local php.ini files and is willing to add a directive to the server php.ini to allow your local php.ini override you need to get them to add:

export PHPRC=../inetpub/e/yourdomain.com

to the head of the server php.ini. (Your path might be different)

Then add a copy of the server php.ini file to your public root, change whatever is required (register_globals in my case) and you are good to go. I did not need to place the new php.ini file in each folder - it has been applied recursively.

Cheers