Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: PHP Local Settings per Directory Setup |
|
Author |
|
andrewteg
Joined: 24 Jun 2014 Posts: 3 Location: Virginia, USA
|
Posted: Fri 27 Jun '14 18:06 Post subject: PHP Local Settings per Directory Setup |
|
|
I'm sure this has been asked but I can't find it, so please bear with me
Everything is working great for me thanks to all the great threads here, but I cannot figure out how to get local PHP settings to change per directory. I'm running PHP as FastCGI with the files here (httpd-2.4.9-win64-VC11 and mod_fcgid-2.3.9) so I understand I can't use php_value and php_flag, and tests throw a 500 Internal Server Error as expected. Otherwise, .htaccess works fine.
Also, php local/master settings are fine if I use something like [PATH=c:/apache24/htdocs/folder] directly in my main php.ini but I would like to keep the settings together and also not to have to restart Apache for a PHP change.
What's the best way to setup everything so I can easily change PHP settings in different folders, preferably on the fly? Can I setup custom php.ini files for each folder to override some settings? If so, how? Or is there another or better way to do this?
Thanks all,
Andrew |
|
Back to top |
|
Cy4n1d3
Joined: 22 Apr 2013 Posts: 17
|
Posted: Sat 28 Jun '14 0:00 Post subject: |
|
|
You can use a different php.ini using the following lines:
Quote: | <IfModule mod_fcgid.c>
FcgidInitialEnv PHPRC "c:/apache/dir"
</IfModule>
|
'dir' would contain php.ini then. |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7398 Location: EU, Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|