| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2003
25 posts
Gave thanks: 0
Thanked 0 times
|
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 |
|
|
|
|
|
#2 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Nov 2003
432 posts
Gave thanks: 0
Thanked 0 times
|
If php is running as an apache module, PHPSuEXEC not enabled, it is possible to override php.ini settings in .htaccess
http://www.karakas-online.de/EN-Book...arameters.html |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Oct 2003
25 posts
Gave thanks: 0
Thanked 0 times
|
Thanks that did it. Here's an example.
In .htaccess Code:
php_value register_globals Off ![]() |
|
|
|
|
|
#4 (permalink) | |
|
Registered User
Fresh Surpasser
Joined in Oct 2005
Hosted on SH86
22 posts
Gave thanks: 1
Thanked 0 times
|
Quote:
Whatever works, Just 2 cents!!
__________________
SH86 (IP 72.29.83.114) <a href="www.deltaxchange.com"> The PirateXchange</a> Last edited by Bugs; January 16th, 2006 at 6:15 AM. |
|
|
|
|