php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31867 PHP does not read my php.ini which is in "Configuration File (php.ini) Path"
Submitted: 2005-02-07 05:22 UTC Modified: 2005-03-20 18:08 UTC
From: php at pwhite dot mailhaven dot com Assigned:
Status: No Feedback Package: PHP options/info functions
PHP Version: 5.0.3 OS: Linux 2.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-02-07 05:22 UTC] php at pwhite dot mailhaven dot com
Description:
------------
My configuration line:
./configure --prefix=/home/pwhite/my_php5 --with-apxs2=/home/pwhite/my_httpd/bin/apxs --with-bz2 --with-pgsql

Here's what phpinfo() gives:
Configuration File (php.ini) Path: /home/pwhite/my_php5/lib

Yet my PHP installation does not recognize the file /home/pwhite/my_php5/lib/php.ini!

However, when I copy the file to /usr/local/lib/php.ini, it works.

Reproduce code:
---------------
My /home/pwhite/my_php5/lib/php.ini:

[PHP]
magic_quotes_gpc = off


Expected result:
----------------
I expect PHP to recognize /home/pwhite/my_php5/lib/php.ini.  I should not be expected to have write access to /usr/local/lib, since I installed PHP to a non-standard directory.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-07 06:06 UTC] rasmus@php.net
Use --with-config-file-path=/home/pwhite/my_php5/lib when you build.
 [2005-02-07 07:12 UTC] php at pwhite dot mailhaven dot com
Yes, I saw that option, but wouldn't you consider it a bug when phpinfo() displays a directory as THE "configuration file path", and yet when there's a valid configuration file in that directory, it does not read it?  If it only looks in /usr/local/lib for php.ini, why list /home/pwhite/php5/lib as the config file path?
 [2005-02-08 22:13 UTC] php at pwhite dot mailhaven dot com
Update: even with --with-config-file-path=/home/pwhite/my_php5/lib, my file is still ignored.
 [2005-02-08 22:20 UTC] tony2001@php.net
Please check if your Apache's user (I bet it's "nobody") has all necessary privileges to read the ini file.
 [2005-02-09 01:37 UTC] php at pwhite dot mailhaven dot com
Yes, the user "nobody" has read access to the file.  I verified it by doing `su nobody` (after changing its shell to bash) and by viewing the file.
 [2005-02-28 20:47 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-20 18:08 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 11:01:31 2024 UTC