php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7666 PHP4 doesn't read php.ini with NT4/IIS
Submitted: 2000-11-06 19:05 UTC Modified: 2001-03-08 20:23 UTC
From: christoph dot steinmann at erz dot be dot ch Assigned:
Status: Closed Package: *Configuration Issues
PHP Version: 4.0.3pl1 OS: NT4
Private report: No CVE-ID: None
 [2000-11-06 19:05 UTC] christoph dot steinmann at erz dot be dot ch
Hi 

I can't get PHP4 to parse the php.ini file on two NT4/IIS-systems, one with CGI, one with ISAPI. 
I tried with php.ini in %windir% and in the php directory, but when calling phpinfo() I always get the default values. 
There are no duplicate php.ini files on both systems. I always stopped and restarted IIS on the command line when I've tried another configuration. I also tried to set the PHPRC environment variable to the correct path.

I wonder why phpinfo() says 

Configuration File (php.ini) Path : php.ini 

instead of c:\winnt\php.ini? 

On my local system with NT/Apache everything works perfectly. 

When scanning the web I found lots of messages describing a similar problem. None of the answers suited my problem. I'm neither a PHP pro nor a beginner. 

Thanks in advance for an answer. 
Christoph

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-14 10:19 UTC] christoph dot steinmann at erz dot be dot ch
I now found the way to get it work (CGI-version):

The php.ini is only parsed, when php4ts.dll resides in %windir%/system32 AND php.ini in %windir%.
When I add the php directory to the PATH, php works with all files there, but the ini-File will not get parsed, neither in the php directory nor in %windir%. I also tried to set PHPRC accordingly, but it didn't work.

I think there must be a bug in the application when it tries to find php.ini. Perhaps one could change the windows install instructions (php4ts.dll MUST be copied to system32 not only to somewhere in the PATH)

I can't do it myself because I'm still not good enough... sorry.

Thank you
Christoph

 [2001-01-12 21:14 UTC] cynic@php.net
until 4.0.4 incl. phpinfo() reported 'php.ini' (i. e. the filename without path) on windows. are you sure the files weren't read? could you try with a more recent version (4.0.4pl1 optimally)?

also note, though this may be of little relevance, that at least with win32 Apache, php.ini is read properly from %windir% or the directory where Apache.exe resides regardless whether php4ts.dll is in the Apache directory or %windir%/system32.
 [2001-03-08 20:23 UTC] sniper@php.net
No feedback.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 13:01:28 2024 UTC