|
Posted by Tim Boring on 08/16/05 20:01
On Tue, 2005-08-16 at 17:59 +0200, Torgny Bjers wrote:
> Tim Boring wrote:
>
> >I'm having a problem with php-cli and php_mod reading my php.ini file.
> >I've compiled php from source, during which process I set
> >"--with-config-file=/etc". Once the compile completed, I then copied
> >php.ini-recommened to /etc/php.ini.
> >
> >After restarting Apache, I run phpinfo() and "Configuration File Path"
> >is showing only "/etc", which means it's not find /etc/php.ini. So then
> >I tried the cli and ran phpinfo() from it and same thing. If I run it
> >as "php -c /etc/php.ini", it can find/read it.
> >
> >For what it's worth, this is happening on a Gentoo system, but this
> >shouldn't make too much of a difference since I've compiled PHP from
> >source (v5.0.4), the same source I've used on a couple of other
> >(non-Gentoo) machines.
> >
> >Just in case, here's the configure command I used:
> >'./configure' '--with-apxs2=/usr/sbin/apxs2' '--disable-cgi'
> >'--with-config-file-path=/etc' '--with-openssl' '--with-zlib'
> >'-enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-dba'
> >'--with-db4' '--with-inifile' '--with-flatfile' '--enable-dio'
> >'--enable-ftp' '--enable-gmp' '--with-unixODBC' '--with-pgsql'
> >'--with-readline' '--enable-soap' '--enable-sockets' '--enable-wddx'
> >'--with-xsl' '--with-pear'
> >
> >Any ideas?
> >
> >
>
> I think that --with-config-file-path is an absolute path to the php.ini
> file, and not just a directory name, although, it ought to default to
> php.ini, but perhaps when setting that directive it assumes that you are
> specifying a custom configuration file, for instance /etc/php5_alt.ini
> or /etc/my_php.ini instead of just php.ini. So, I think you should use
> the --sysconfdir directive instead if you just want to specify where PHP
> has its ini file.
>
> Regards,
> Torgny
>
Okay, I resolved it by running "make clean" in the source directory and
then re-running configure/make/make install. I think what happened was
the first time I compiled it I didn't use the --with-config-file-path
option, then went back and re-compiled with setting
--with-config-file-path=/etc but without running "make clean" first.
Thanks,
Tim
--
Tim Boring
IT Manager
Automotive Distributors Warehouse
2981 Morse Road
Columbus, OH 43231
Toll Free: 800-421-5556, x3007
Direct: 614-532-4240
E-mail: tboring@adw1.com
[Back to original message]
|