logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP Local Settings per Directory Setup
Author
andrewteg



Joined: 24 Jun 2014
Posts: 3
Location: Virginia, USA

PostPosted: Fri 27 Jun '14 18:06    Post subject: PHP Local Settings per Directory Setup Reply with quote

I'm sure this has been asked but I can't find it, so please bear with me Smile

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

PostPosted: Sat 28 Jun '14 0:00    Post subject: Reply with quote

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

PostPosted: Sat 28 Jun '14 11:34    Post subject: Reply with quote

There is an older topic about it

http://www.apachelounge.com/viewtopic.php?t=3430

if your still have a question please ask again
Back to top


Reply to topic   Topic: PHP Local Settings per Directory Setup View previous topic :: View next topic
Post new topic   Forum Index -> Other Software