php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35329 php.ini location changed between 5.0 and 5.1
Submitted: 2005-11-22 13:10 UTC Modified: 2005-12-18 20:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: cjbj at hotmail dot com Assigned: wez (profile)
Status: Not a bug Package: *General Issues
PHP Version: 5.1.0 OS: win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cjbj at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-11-22 13:10 UTC] cjbj at hotmail dot com
Description:
------------
PHP 5.0 on Windows reads a php.ini located at
c:/Program Files/Apache Group/Apache/conf/httpd.conf
or c:/Program Files/Apache Group/Apache/conf2/httpd.conf.

PHP 5.1.0RC7-dev (Nov 22 2005 08:23:50) does not read
this php.ini.  Phpinfo() shows php.ini as "C:\WINDOWS",
i.e. it has not found a php.ini

This is a backward compatibility breakage I didn't notice
documented in Steph's 5.1 upgrade notes.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-23 02:54 UTC] cjbj at hotmail dot com
When I upgraded from 5.5 to 5.1, I had to

0. Unzip 5.1 to c:\php5-win32-latest

1. Edit c:/Program Files/Apache Group/Apache2/conf/httpd.conf and change:
     LoadModule php5_module "c:/php5.0-win32-200511031730/php5apache2.dll"
   to
     LoadModule php5_module "c:/php5-win32-latest/php5apache2.dll"

2. Edit c:\Program Files\Apache Group\Apache2\php.ini and change:
     extension_dir = "c:\php5.0-win32-200511031730\ext"
   to
     extension_dir = "c:\php5-win32-latest\ext"

3. Copy c:\Program Files\Apache Group\Apache2\php.ini to c:\WINDOWS

Step 3 was not needed when upgrading any 5.0.x to 5.0.y.
 [2005-11-28 15:19 UTC] wez@php.net
Chris, can you try using filemon from sysinternals to see if it's trying to access alternate php.ini paths?
 [2005-11-28 17:10 UTC] rrichards@php.net
CWD (why it checked the Apache dir) is now only searched when running under CLI. Either this is really a bug or FAQ in the manual should be changed to say to use Apache/bin (path is checked in 5.0 and 5.1 at least since its the binary location).
 [2005-12-13 01:13 UTC] stan64 at gmail dot com
I have got this bug also on 2 systems with alot of installation methods and with both 5.0.4 and 5.1.1.

First off PHP won't work if I set PHPIniDir to a wrong path other than the config file lies within.

When it's pointed at the wrong location phpinfo says that it have found a ini file in the windows directory. Though it does not contain such a file.

I try to put my file there and it don't read it. It still reads it imaginary file that is supposed to be located in the windows directory.

I have read through the installation steps carefully, tried all helpful comments. Tried things I found on google. And all with the same result.
 [2005-12-13 01:38 UTC] stan64 at gmail dot com
Ok, so I used filemon to see where it checked for php.ini.

I put it in php root, that is in path and PHPIniDir. And it finds the file reads it and php don't work. I use the recommended ini configured like the last versions that worked.

If I try to put it in Windows then... The read pattern is similiar for alot of scrolling but it never looks for php.ini outside of the php directory. PHP works and says it found the ini in the windows directory. Though the settings n phpinfo do NOT represent the ini I put there.
 [2005-12-18 20:00 UTC] sniper@php.net
This is no bug, it has been documented like this forever:
http://www.php.net/manual/en/configuration.php#configuration.file

What you've relied upon was an undocumented bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 05 00:01:27 2024 UTC