Results 1 to 3 of 3
Hello,
I'm running CentOS 5 with suPHP in FastCGI mode. PHP 5.2.5.
For some reason the custom php.ini is not loading from within the current directory.
I've setup my server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-08-2008 #1Just Joined!
- Join Date
- May 2007
- Posts
- 24
PHP4 & PHP5 custom php.ini file not loading
Hello,
I'm running CentOS 5 with suPHP in FastCGI mode. PHP 5.2.5.
For some reason the custom php.ini is not loading from within the current directory.
I've setup my server to host shared hosting plans and I would like the ability for each account to have a custom php.ini file load when the want. However, regardless of the version that is loaded (4 or 5) of php, the default php.ini file for PHP5 loads (/usr/local/php5/cgi/php.ini)
I cannot seem to get the php.ini fille to load from the current directory.
Can someone please help me with this?
Also... If it is possible, I would like it to load recursively from the directory ABOVE the /home/username/public_html location. I want to be able to have it not accessible from the internet if possible.
Please help!
- 06-09-2008 #2
If i understand your problem correctly,by default ,you are using php.ini - but you want to use php.ini file found in
/some/directory/path/php.ini
If so , Check your environmental variables $PATH whether
/usr/local/php5/cgi/ comes in front of /some/directory/path/.
If you have .bash_profile file
open the file
Then add the following line:Code:vi ~/.bash_profile
Now check output of the echo $PATH and make sure your desired directory listed before default path /usr/local/php5/cgi/Code:PATH=/some/directory/path : $PATH export PATH
HTHFirst they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 06-09-2008 #3Just Joined!
- Join Date
- May 2007
- Posts
- 24
Not exactly.
By default I want to use PHP5. I want the ability for somone to run PHP4 when needed. This works fine, they can activate php4 by either using .php4 extensions or they can AddHandler and AddType to the .htaccess file to use PHP4.
That works fine.
I've had a hosting plan in the past that if you placed a php.ini file in the directory that your script is executed then PHP will use the local config file instead of the default (/usr/local/php5/cgi/php.ini).
I want my installation to behave like this. But, when I place a php.ini file into the local directory, it isn't loading it for some reason.


Reply With Quote

