Date: Tue, 6 Jan 2009 09:09:29 -0500 From: APseudoUtopia <apseudoutopia@gmail.com> To: "=?UTF-8?Q?Morgan_Wesstr=C3=B6m?=" <freebsd-questions@pp.dyndns.biz> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: PHP Apache module no longer loads /usr/local/etc/php.ini Message-ID: <27ade5280901060609t2e768f14p32639b7ed2ac7a9c@mail.gmail.com> In-Reply-To: <4962EB85.7000700@pp.dyndns.biz> References: <4962EB85.7000700@pp.dyndns.biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 6, 2009 at 12:26 AM, Morgan Wesström <freebsd-questions@pp.dyndns.biz> wrote: > Hi. > > I have two almost identical FreeBSD servers with FreeBSD 7.0, Apache > 2.2.11 and PHP 5.2.8. After a restart of Apache four days ago, the PHP > module on one of those servers no longer loads /usr/local/etc/php.ini > and I can't for my world figure out what's preventing it. My workaround > right now is to move php.ini to / where it is loaded properly. > > phpinfo on non-working server: > http://pp.dyndns.biz/phpinfo.php > > phpinfo on working server: > http://prefectftp.no-ip.com/phpinfo.php > > According to php.net the default location for php.ini is /usr/local/lib > and to change that you have to compile PHP with > --with-config-file-path=/some/path but I can't see that this is done on > FreeBSD. Still /usr/local/etc is listed in phpinfo's "Configuration File > (php.ini) Path". What mechanism does FreeBSD use to alter the default > location of the ini file? Can I somehow have interfered with that mechanism? > > The following things DO work though: > - Setting PHPRC to /usr/local/etc (as described in php.ini) and > restarting Apache loads /usr/local/etc/php.ini correctly. > - CLI version works correctly regardless of PHPRC: > # php -i | grep php.ini > Configuration File (php.ini) Path => /usr/local/etc > Loaded Configuration File => /usr/local/etc/php.ini > > No errors are listed in any log-file and I've been banging my head > against the wall for four days now trying to solve this... Any help > would be appreciated to figure out what stupid mistake I've made. :-) > > Regards > Morgan > Notice: Configuration File (php.ini) Path /usr/local/etc Loaded Configuration File /php.ini So it _IS_ looking in /usr/local/etc/ for a php.ini file, it just can't find it. Move the file back to /usr/local/etc/, then make sure the permissions are correct (so the www-data user can read) on both the php.ini file and the directories above it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27ade5280901060609t2e768f14p32639b7ed2ac7a9c>
