Php5 and php.ini


#1

I installed php5 (apache module) on my shared account a few months ago with no problems using these instructions (http://shimon.phpwebhosting.com/howto/index.php/installphp5/)

I’ve recently tried installing an app and ran into a problem with the session.save_path. phpinfo() tells me that it is set to no value. I’ve tried dropping a new php.ini file in my applications directory with no luck. I can’t seem to find my original php.ini though php.ini-dist and php.ini-recommended are in the php directory.

Does anyone have any ideas of how to help?


#2

You probably need to recompile PHP and specify a special location for your php.ini file.

By default, PHP (well, PHP 4, anyway) is looking in /etc/php/. You’ll probably want to specify /home/user/php.ini or somesuch.

I don’t know it off the top of my head, but running ./configure --help in the source dir should show you all the options. The ini file location will be one of them.

nate.


#3

It’s:
–with-config-file-path=$HOME/php

(or whatever you like. Specify the path only; leave out php.ini)

Actually, you don’t need it. By default, it will look for php.ini in the “etc” directory where you installed it. In any case, phpinfo() tells you what php.ini file it’s using (near the top of the page.)

Are you sure you compiled it as an Apache module on a shared server? That sounds somewhat impossible. It’s normally compiled as a CGI.