RE: odd behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, January 19, 2006 12:31 pm, Jay Blanchard wrote:
> [snip]
> If I recall, PHP on Windows will look for PHP.INI in your Windows
> system
> 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
> like
> 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.
> [/snip]

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
>
> [snip]

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
> ask...
> [/snip]
>
> Changes in php.ini are not reflected in phpinfo() after an IIS restart
> (cache cleared). For instance, the extensions folder is
> c:\php\extensions,
> 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.

> [snip]
> 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
> read
> http://www.site.com/ or does it read http://www.site.com/index.php
> before
> you hit refresh?)
> [/snip]

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.
>
> [snip]
> If you get 404, it's the web server telling the browser it can't find
> the
> 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
> read
> things from C:\WINNT for security reasons... by default at least... or
> could
> be that owner/group is now "jay" or "users" instead of "system" or
> whatever
> it needs to be for IIS to have access to the PHP.INI file.. I forget
> the
> exact permissions).
> [/snip]

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...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux