Thread: Custom PHP.ini?
View Single Post
Old December 10th, 2005, 5:49 AM   #1 (permalink)
codergent
Registered User
Fresh Surpasser
 
Joined in Oct 2003
25 posts
Gave thanks: 0
Thanked 0 times
Question Custom PHP.ini?

I am pretty sure that this is possible (as far as having my own user defined php.ini file to override default settings), but where do I place this file so the PHP engine will recognize it and enforce my settings?

I tried placing it in:

/home/username/
/home/username/etc/
/home/username/public_html/

then running a php script simply calling phpinfo() and the local value and master value in the core settings show exactly the same everytime. My conjecture is that if my settings are enforced, then the local values should differ from the master values. Am I correct?

Mainly, I want to set my PHP environment such that it is production grade (no register_globals on, and things of that nature), but I also want to be able to revert those changes quickly if necessary (e.g. for development), so I am assuming this is what a user defined php.ini will do.

Lastly, is there a way to enforce those user defined PHP.ini settings on certain directories, or is it an all or nothing (meaning once set, then PHP will enforce it only say in folders '/home/username/public_html/myproductionphp/' verus the entire domain)? I would rather prefer the latter, but thought I would ask.

Thanks

Last edited by codergent; December 10th, 2005 at 5:50 AM. Reason: Indicate the topic question is a question rather than an informative
codergent is offline   Reply With Quote