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:04

On Thu, January 19, 2006 11:53 am, Jay Blanchard wrote:
> I had PHP installed on a web server, and all was working OK, save for
> one
> small thing. phpinfo() indicated that the path to the php.ini was
> c:\WINNT,
> which it was not. So I copy the file from the c:\php directory to the
> c:\winnt directory and restart IIS. Now, when I click a link to take
> me to a
> directory with an index.php I get a 404, not found error. If I refresh
> the
> page shows up just fine. So I remove the ini page, start and stop the
> server, click the link, and no problem...the page is delivered just
> fine.
> Has anyone experienced this behavior before, and how do I fix that
> damned
> path to the ini? TIA!

How you fix the path to php.ini is what you did in the first place,
except you shouldn't leave behind the c:\php\php.ini to confuse
yourself some other day.

MOVE the file to c:\winnt where PHP thinks it must be.

Other Options:
Re-compile PHP from scratch to choose a different path for php.ini

Use that new-fangled Apache directive to tell Apache where to find
php.ini -- This implies dumping IIS and using Apache, which you should
do anyway :-)

Meanwhile, back at the ranch, your question SHOULD be:

How do I get IIS to not return 404 for the first hit on a URL, then
the correct content on subsequent hits?

Standard Windows Debugging 101:

Re-boot the whole machine and pray.

Re-install the entire OS and all software.

Switch to Linux.

The first two steps are what Microsoft always tells me to do. :-)

Sorry. Best I can do for you...

I suspect that in this case, some sort of brain-dead IIS/DNS/MS-OS
cache is screwing you up and a re-boot (#1) actually WILL solve the
problem. This is, however, only a guess.

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

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