You are here: RE: [PHP] odd behavior « PHP « IT news, forums, messages
RE: [PHP] odd behavior

Posted by "Richard Lynch" on 01/19/06 22:11

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 (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
> or does it read
> 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 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?



[Reply to this message]

Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация