PHP won't load php.ini

Posted by Chuck on Pro Webmasters See other posts from Pro Webmasters or by Chuck
Published on 2011-09-14T23:56:32Z Indexed on 2011/11/14 10:12 UTC
Read the original article Hit count: 700

Filed under:
|

I am racking my brain here and I must be doing something really stupid.

I'm trying to setup PHP on Win2008 R2/IIS 7.5. I unpacked php538 into c:\php538 and renamed the php.ini-development to php.ini. Then i tried going to a command prompt and running:

c:\php358\php -info

I get:

Configuration File (php.ini) Path => C:\windows
Loaded Configuration File => (none)Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)

I have tried using php5217. I tried putting php.ini in c:\windows. I tried creating the PHPRC envrionment variable and pointing it to c:\php358. Every time I have the same problem. PHP does not find or load the ini file.

If I run:

c:\php358\php -c php.ini -info

Then it will load the file. But I shouldn't have to do this for PHP to find the file in the same directory, in the Windows directory, or using the environment variable, so I'm stumped. When I try to run PHP from IIS I get a 500 error and I can only assume at this time it is because it can't find and load the php.ini file correctly.

I see similar questions on here, but none seem to address the problem I am having.

© Pro Webmasters or respective owner

Related posts about php

Related posts about iis