php5 and php.ini

php5 and php.ini

Posted by: sprice
Posted on: 2005-04-05 23:01:00

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?

Re: php5 and php.ini

Posted by: nate
Posted on: 2005-04-06 09:33:00

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.

Re: php5 and php.ini

Posted by: Mark
Posted on: 2005-04-07 22:47:00

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.

Tags: phpini filephpinfophp5apache modulehttpluckpathhelp