php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37919 PHP doesn't read the configurations propertly
Submitted: 2006-06-26 18:30 UTC Modified: 2010-03-19 15:55 UTC
Votes:8
Avg. Score:3.9 ± 1.1
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:6 (85.7%)
From: rafael dot amador at gmail dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 5.2.3 OS: Windows XP Pro SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rafael dot amador at gmail dot com
New email:
PHP Version: OS:

 

 [2006-06-26 18:30 UTC] rafael dot amador at gmail dot com
Description:
------------
in IIS 5.1, PHP ISAPI Module and .Net framework 2.0 installed, following instructions from install.php, PHP doesn't read the options in file php.ini 

if i put php.ini in c:\php\ (the webserver init php but you can't configure any option, php don't load any modules and in phpinfo() page you look strange values)

example:
 Configuration File (php.ini) Path: "C:\WINDOWS" must be "c:\php\php.ini"

extension_dir:	"C:\php5"	"C:\php5" in phpinfo()
in php.ini the value is: extension_dir = ""c:/php/ext/"

i've PATH pointing to c:\php\, my document_root is well configured

and i put php.ini in other place php shows message "No input file specified."

i'm experimenting the Bug #37843
and other bug (if you put php5isapi.dll in ISAPI Filters when you shutdown the server ISS crash allways)

Reproduce code:
---------------
<?
phpinfo();
?>

Expected result:
----------------
that my changes to php.ini are reflected in phpinfo()

Actual result:
--------------
php shows strange parameter configurations (i can't load any module) 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-26 18:46 UTC] tony2001@php.net
Did you add c:\php to your PATH environment variable?
 [2006-06-26 18:50 UTC] rafael dot amador at gmail dot com
yeah sure i've checked the PATH enviroment variable and c:\php is present
 [2006-06-26 18:52 UTC] tony2001@php.net
And did you reboot after that?
 [2006-06-26 18:54 UTC] rafael dot amador at gmail dot com
sure i followed all instructions
 [2006-06-26 21:09 UTC] rafael dot amador at gmail dot com
i rebooted my server and again i've the same result
 [2006-06-27 02:16 UTC] rafael dot amador at gmail dot com
i configured the php file with the registry entry pointing to it and didn't work but if i comment the doc_root option in php.ini all works WELL.

a couple of questions come to me now:

why the windows PATH method doesn't works?

why the registry method works only with doc_root disabled?

i saw a lot of bugs that have similar behavior. check this beacuse if isn't a bug then isn't documentated.
 [2006-09-27 07:25 UTC] mcloudteo at hotmail dot com
Do this:

     * Go to Control Panel and open the System icon (Start -> Settings ->
       Control Panel -> System, or just Start -> Control Panel -> System
       for Windows XP/2003)
     * Go to the Advanced tab
     * Click on the 'Environment Variables' button
     * Look into the 'System variables' pane
     * Click on 'New' and enter 'PHPRC' as the variable name and the
       directory where php.ini is located as the variable value (e.g.
       C:\php)
     * Press OK and restart your computer
 [2006-10-22 20:45 UTC] rafael dot amador at gmail dot com
i've perfectly told that any other method works, with this statement i mean any other method DOESN'T WORK. and  by the way i'm reporting a BUG i've a work arround but the bug still remains in the code. 

i've solved this with the register method now i've my server working with this method but the point here is that the PATH method doesn't work ... 

i've spend a lot of time reporting this bug and following the progress of it. i'm waiting that anyone there (Zend-PHP developer staff) take this seriously don't give me a pretext to close this bug. This danm bug is giving headaches to more than a couple of IT admins. 

i'm very annoyed about the response time showing a profesionless attitude ... sorry guys but it's the truth
 [2007-04-16 20:12 UTC] sniper@php.net
It's not quite clear what does not work for you:

a) Are you able to run PHP scripts at all?
b) Does removing 'doc_root' setting from php.ini really fix this?
c) How about running PHP as FastCGI? (I prefer this myself, running PHP as module is so 90's :)

 [2007-04-16 21:08 UTC] rafael dot amador at gmail dot com
ok 

the point here that using ISAPI module in IIS and trying to use the Path method to configure the module, makes that PHP doesn't recognize propertly the php.ini path and its configuration that situation makes that php doesn't load any additional modules including mysqli and any others...

becoming any php script in a useless piece of code... stills run but is not capable to call any functions of any module...

i hope that this explanation make you clear what i'm reporting here...

response to the questions

a) with the specified conditions, yes, but without any configuration available no additional modules, php scripts become useless with this bug.

b) yes , in addition with windows registry php configuration method. verified in 3 servers.

c) i think that running php in FastCGI must works, but exists another anoying bug related with CGI and IIS that doesn't permit to write a cookie ... but this bug is from Microsoft.
 [2007-07-09 12:10 UTC] jani@php.net
Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Again, try the snapshot. I added the actual php.ini file in use to be shown with phpinfo() output, so check that after installing the snapshot.
 [2007-07-20 12:44 UTC] rafael dot amador at gmail dot com
I've tested the last snapshot and the bug is present but now phpinfo shows a bit different result since the 1st time.

i can't run any modules. Again 

notice the output of my phpinfo(), maybe this can give you a clue about what's happening.

Configuration:
PHP Core

Directive      Local Value     Master Value   | And should be ...
doc_root       no value        no value       | "c:\inetpub\wwwroot"
extension_dir  C:\php5         C:\php5        | "c:\php\ext"

PHP Variables
Variable	           Value
_SERVER["DOCUMENT_ROOT"] = "c:\inetpub\wwwroot"
_ENV["Path"] = "C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\QuickTime\QTSystem\;C:\php"

Output from phpinfo()
 [2007-07-22 23:26 UTC] jani@php.net
What does phpinfo() have in the "Loaded configuration file" section?
And above that, what does it have the path set to?
 [2007-07-23 12:22 UTC] rafael dot amador at gmail dot com
As you requested ...

Configuration File (php.ini) Path    C:\WINDOWS
Loaded Configuration File            (none)
 [2007-07-24 12:04 UTC] jani@php.net
Misconfiguration of your system is not any bug in PHP..
 [2007-07-24 21:49 UTC] rafael dot amador at gmail dot com
... i followed every instruction in Install.txt then iit's not my fault is a bug ... install IIS and Install PHP and check it ... you are flaging wrong this bug ...
 [2007-07-24 21:53 UTC] rafael dot amador at gmail dot com
how can be that in the phpinfo shows me two diferents setting  ....

Configuration File (php.ini) Path    C:\WINDOWS
Loaded Configuration File            (none)

And

_SERVER["DOCUMENT_ROOT"] = "c:\inetpub\wwwroot"
_ENV["Path"] =
"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de
programa\QuickTime\QTSystem\;C:\php"


ehhh ????

i added the path how is specified in the install text or modify your install instruction to SHOW EXACTLY how you need to config your system to use PATH setting in PHP or fix this bug ...
 [2008-12-01 13:28 UTC] rafael dot amador at gmail dot com
THIS BUGS ISN'T FIXED... WHY YOU GUYS TRY to understand the bug ... this is anoting .... in the current version the PROBLEM YET Occurs
 [2008-12-01 13:31 UTC] rafael dot amador at gmail dot com
i invite everyona that sufred from this bug post a comment to express the problem and vote i hope that the php team resolve this bug. 

This bug is more than 3 years old and PHP team has flagged it as "BOGUS" as a quickly way to discard it and not to resolve it as should be
 [2010-03-19 09:27 UTC] dmathieu at oetker dot fr
Always the error with windows 2008 and iis 7
 [2010-03-19 09:31 UTC] pajoye@php.net
Which bug are you referring to? The initial report is completely bogus and mix many different things which have nothing to do with php.ini.

If you are experiencing a problem, please open a new bug with a clear explanation :)
 [2010-03-19 15:55 UTC] rafael dot amador at gmail dot com
i don't know which part is bogus, if you read carefully, i reported the error very preciselly, the bug involves a wide range of components ,and inclusive i had posted a workarround ... since i posted the bug in 2006 ... noone has really checked the bug and by other way a lot of user had reported the bug with diferent name... i think that my bug use case is clear ...
 [2010-05-24 17:49 UTC] wordlordca at hotmail dot com
I have the same problem as reported here.

php 5.3.2 NTS, VC9 for 32 bit server 2008
iis7
fastcgi
server : windows srever 2008, virtual server
 [2010-05-25 08:18 UTC] wordlordca at hotmail dot com
I want to report that when i run from cmd php.exe -info i get a response stating that my php.ini file was not found, however when i run a php file from my browser and that php file has phpinfo(); it responds by telling me that the configuration file php.ini path is c:\windows , however if i look below it shows that it has loaded my configuration file 

Configuration File (php.ini) Path  C:\Windows  
Loaded Configuration File  D:\PHP\php.ini  


I also want to report: 
- without any path appendage to my environment variables, and without any registry key stating inifilepath and without phprc set to point to my php folder i was still able to get te correct response from phpinfo when i run it through a php file via a browser. It's as if it's starts looking where php-cgi.exe is located and goes from there.
 [2011-01-17 18:12 UTC] phdfromic at yahoo dot com
I had the same problem, then I found that in the Apache configuration file, 
httpd.conf, I had PHPIniDir pointing to the wrong directory. I corrected it to 
PHPIniDir "c:/Program Files/php"
and now it all works.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC