Posted by "Richard Lynch" on 01/19/06 22:11
On Thu, January 19, 2006 12:31 pm, Jay Blanchard wrote:
> If I recall, PHP on Windows will look for PHP.INI in your Windows
> folder (in this case C:\WINNT) first, then in the folder where PHP is
> installed. Deleting the PHP.INI under WINNT should be fine (sounds
> removing that makes things work ok for you). I'd think phpinfo()
> would show
> that it's in C:\PHP (or whereever) in that case.
Almost for sure, this is just plain wrong.
It is maybe correct for DLLs, with the caveat that PHP will also look
in the extensions directory in php.ini, assuming you get php.ini
loaded in the first place.
> c:\php is in the path statement, but it does not show it as being
> there when
> I remove it from c:\winnt
PHP doesn't consider 'path' at all when looking for php.ini, almost
for sure. It's a constant compiled into the software, essentially,
except for the new-fangled Apache directive to change it.
> If for some reason you need to use PHP.INI in C:\WINNT then let me
> Changes in php.ini are not reflected in phpinfo() after an IIS restart
> (cache cleared). For instance, the extensions folder is
> the ini reports c:\php4
Changes in php.ini are irrelevant until you get php.ini loaded by
putting it into c:\winnt where PHP is looking.
Your 404 problem is entirely separate and distinct from this issue.
Solve them separately.
php.ini problem is easily solved.
404, you're on your own.
> if you go to http://www.site.com/ (no index.php) on it, is that when
> you get
> the 404? Then you say you refresh and it works fine? (does it still
> http://www.site.com/ or does it read http://www.site.com/index.php
> you hit refresh?)
This is probably dependent on web-server configuration. Or, at least,
it is possible to configure Apache in such a way that it will actually
force the user to be re-directed to the DocumentIndex, I think.
Or perhaps naive inexperienced Apache users do this as a work-around
since they don't understand DocumentIndex.
I got no idea how IIS handles any of the DocumentIndex-like stuff.
> Yes.It still reads http://www.site.com before and after refresh.
> If you get 404, it's the web server telling the browser it can't find
> page. So it shouldn't be a permissions issue or anything with PHP.INI
> (although I'd check to make sure... IIS may not have permissions to
> things from C:\WINNT for security reasons... by default at least... or
> be that owner/group is now "jay" or "users" instead of "system" or
> it needs to be for IIS to have access to the PHP.INI file.. I forget
> exact permissions).
If it doesn't have permissions the first page hit, it won't have
permissions the second time.
Seems unlikely to be the source of the problem...
[Reply to this message]