php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51328 Configuration File (php.ini) Path incorrect
Submitted: 2010-03-19 10:00 UTC Modified: 2010-03-19 11:27 UTC
From: dmathieu at oetker dot fr Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.2 OS: Windows 2008 SP2 with iis 7
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: dmathieu at oetker dot fr
New email:
PHP Version: OS:

 

 [2010-03-19 10:00 UTC] dmathieu at oetker dot fr
Description:
------------
I have just install php 5.3.2  All appeared to work well. I installed to c:\PHP folder. Then wrote a small .php test file (below) and tried it and the noticed that: 
The phpinfo() function is reporting php.ini file as being in the 'C:\Windows' directory.  It is actually located in 'C:\PHP' directory. I have searched my c drive and there is only one copy of php.ini and it is in the c:\PHP directory.  I assume it finds the php.ini via the path environment which now starts with c:\PHP.

I see other errors on my phpinfo():

include_path .;C:\php5\pear .;C:\php5\pear 
it's wrong: c:\php is my only php folder

Configure Command  cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet"  

I don't know why I have d:\ here, I don't have it.
Don't know too why it use oracle, I don't use it...



Test script:
---------------
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
<?php phpinfo(); ?> 
 </body>
</html>


Expected result:
----------------
C:\PHP


Actual result:
--------------
C:\Windows

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-19 10:12 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-03-19 10:12 UTC] pajoye@php.net
No, PATH has nothing to do with how PHP finds php.ini.

You can either use the PHPRC (see http://www.php.net/configuration) or the -c argument in the command line (CLI or FastCGI) to specify another location. Check the "Loaded configuration file" to see which php.ini is actually loaded.

Secondly, the include_path or extension_dir are default paths, they are used when the loaded php.ini does not define any.

The other path inside the configure line has nothing to do with your setup but the options used to compile php.

Sorry, but I will bogus this report as well as it is clearly a configuration problem.
 [2010-03-19 10:26 UTC] dmathieu at oetker dot fr
Ok, I agree that Configuration File (php.ini) Path is different that Loaded Configuration File. But why it want to use c:\windows as config file???? explain me...

for information PHPRC variable is correctly put on my system.

I can't install any php / mysql application for the moment, it don't works!.

for include_path, I see my error, sorry.

But the most important for me is why I have a c:\windows in php config path...
 [2010-03-19 11:27 UTC] pajoye@php.net
Again, it is a default location, see http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/ for a complete howto (or the php manual).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Sep 03 17:00:01 2025 UTC