php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22189 Configuration file is not loaded, though PHP reports it is
Submitted: 2003-02-12 10:57 UTC Modified: 2003-08-04 14:18 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: krenya at inf dot bme dot hu Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.2-RC OS: Linux 2.2 / 2.4
Private report: No CVE-ID: None
 [2003-02-12 10:57 UTC] krenya at inf dot bme dot hu
Something is probably wrong with intrepreting the following configure option:
'--with-config-file-path=/usr/local/apache/conf/php.ini'

phpinfo() will report this:

Configuration File (php.ini):
   "/usr/local/apache/conf/php.ini"

This is exactly the same as if you compile it with a saner option:
'--with-config-file-path=/usr/local/apache/conf/'

The difference between the two cases is that in the first case the config file is not loaded by PHP. My educated guess is that it tries to load if from: "/usr/local/apache/conf/php.ini/php.ini" so it fails and the location is simply misreported in phpinfo().

I fisrt met this a long ago with 4.0.6 or 4.1.2 or so, but it's still there in 4.3.0 as I just ran into this type of a problem again.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-12 12:12 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your assumption is quite correct, this option needs to be only passed the directory where the php.ini can be found not the path to the file itself.
 [2003-02-12 16:05 UTC] krenya at inf dot bme dot hu
Thanks for the answer but I think might you have missed the point so let me put this in another context:
Some slightly insane sysop wants php.ini to reside here: /etc/php.ini/php.ini
and uses the following config line to specify the path:
'--with-config-file-path=/etc/php.ini'

phpinfo() will show for Configuration file: '/etc/php.ini' instead of '/etc/php.ini/php.ini' which would be the correct location. The problem might be with phpinfo then: you put the config file where PHP says it loads it from, but it doesn't load it. Well at least in this insane case when you choose such a location.
 [2003-03-22 19:25 UTC] sniper@php.net
For me, it fails with this error, IF I have /etc/php.ini/
directory:

input in flex scanner failed
/www/apache/bin/apachectl startssl: httpd could not be started

So I can't even start Apache in such case.

 [2003-08-04 14:18 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

It seems to me that if an admin decides to create a php.ini directory for the purpose of storing php.ini not only are they creating confusion by inviting trouble. Plus if they absolutely must do this they should be using the --with-config-file-scan-dir configuration directive.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Aug 25 02:01:27 2024 UTC