2

I'm running Leopard 10.5.8 with the Apple-supplied versions of PHP (5.2.10) and Apache (2.2.11). Changes made to the /etc/php.ini file are not taking effect after stop/start of Apache. phpinfo() and shell command php -i confirm the 'status quo'. The php.ini file permissions are 444 with root/wheel ownership. It was copied from the php.ini.default file that came with the php distribution. Here's what I'm trying to change - seems pretty like this should be pretty basic stuff:

include_path = ".:/usr/local/some_directory"
// Original entry in the php.ini.default file was commented out
// The directory '/usr/local/some_directory' exists
// phpinfo() only shows include_path = .:

magic_quotes_gpc = Off
// Original entry in the php.ini.default value was 'On'
// phpinfo() shows magic_quotes_gpc = On

I've been all over the php.net website and cannot identify my error. Shouldn't the changes to the php.ini file should be interpreted immediately after restarting Apache?

Has anyone experienced a similar problem? Suggestions for fixing this malfunction would be greatly appreciated. I know I can hard code workarounds into my PHP code but that really defeats the whole purpose of even having a php.ini file....

4
  • What does phpinfo() say for Configuration File Path? Additionally are you seeing any errors in /var/log/apache2/error_log?
    – Chealion
    Commented Nov 8, 2009 at 1:24
  • Configuration File Path is /etc Apache stop/start: [Sat Nov 07 17:22:35 2009] [notice] caught SIGTERM, shutting down [Sat Nov 07 17:22:53 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] mod_bonjour: Skipping user 'Trent' - cannot read index file '/Users/Trent/Sites/index.html'. [Sat Nov 07 17:22:54 2009] [notice] Digest: generating secret for digest authentication ... [Sat Nov 07 17:22:54 2009] [notice] Digest: done [Sat Nov 07 17:22:54 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.10 configured -- resuming normal operations
    – user17213
    Commented Nov 8, 2009 at 2:07
  • [Sat Nov 07 17:22:35 2009] [notice] caught SIGTERM, shutting down [Sat Nov 07 17:22:53 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] mod_bonjour: Skipping user 'Trent' - cannot read index file '/Users/Trent/Sites/index.html'. [Sat Nov 07 17:22:54 2009] [notice] Digest: generating secret for digest authentication ... [Sat Nov 07 17:22:54 2009] [notice] Digest: done [Sat Nov 07 17:22:54 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.10 configured -- resuming normal operations
    – user17213
    Commented Nov 8, 2009 at 2:08
  • Sorry - I'm having trouble formatting the comments to make them more readable....
    – user17213
    Commented Nov 8, 2009 at 2:08

2 Answers 2

1

Problem resolved. For some reason the changes I made to line 305 WRT to error reporting were causing the problem. I had deleted '& ~E_NOTICE' to help supposedly with debugging. I have no clue as to why this change caused the failure - but I was able to move ahead....

Note: I cannot paste the two lines from the php.ini file correctly due to the formatting rules used on this website.

1

Whatever you did with error_reporting had nothing to do with the SSL secret digest.

More likely, you hadn't ever really re-started apache.

Or, possibly, you change some environment variable so PHP could actually find your changed php.ini

Or, even more realistically, you copied you php.ini to where PHP was looking for it.

For anybody else, assuming you have php CLI installed, do this to find out where php is looking for php.ini:

php -i | grep php.ini

You cannot change where it looks. That is compiled in.

You can move or copy you php.ini there, or you can even create a symlink there, but that's where PHP is going to look.

Also note that PHP has absolutely no qualms about starting with no php.ini at all. It simply uses default values that (mostly) match those in php.ini.default

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .