Jump to content

PHP Pages getting 404 Error, "Page cannot be displayed"...


Recommended Posts

I tried putting this into the PHP Installation forum but don't get any answers or suggestions there so I'm going to try it here and hope it doesn't get moved.

 

I'm on a Windows 2003/PHP 5.22 setup.  I'm TRYING to upgrade from PHP 5.02 which did work on my server and quite well.  I followed the upgrading and installation instructions layed out on the PHP.net set -- I still can't get it to work.

 

The install dumped all the PHP related files under "c:\program files\php".  I've ensured that path is in my windows PATH statement for my env vars.  I've also verified that "c:\program files\php\php-cgi.exe" is in my Web Service Extensions listing in IIS and the status is set to "Allowed". 

 

From the command-line, I can execute my "test.php" file that has the phpinfo(); info function in it and it works fine.  It's only when I try to use my web browser to access the php file that I get the 404 error, "page cannot be displayed".  I know that IIS in general is working ok because I can point it to the default http://servername/iisstart.htm and it resolves to that page just fine.  It's only when I change it to http://servername/test.php (which has my phpinfo()) function in it when I get the 404 error.

 

My web server just doesn't seem to be interpretting PHP files anymore and I can't figure out why.  Please help, this is really starting to bug me.

I can point it to the default http://servername/iisstart.htm and it resolves to that page just fine.  It's only when I change it to http://servername/test.php (which has my phpinfo()) function in it when I get the 404 error.

 

If that statement is true, perhaps you don't have the test.php file in the correct file for html files on IIS?

 

I think it's the /wwwroot directory?

 

If that's not it, then you either have to adjust PHP.INI or IIS config so they are on the same page "no put intended"

 

I find it best to leave PHP in the default directory c:/php but you don't have to obviously...

But I do.... my test.php file is under c:\inetput\wwwroot\test.php just like my c:\inetpub\wwwroot\iisstart.htm file is and like i said... the HTM file reads like it should but the test.php file doesn't display. 

 

The only reason I'm using C:\program files\php instead of c:\php is because that's what the PHP 5.22 installation notes recommend.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.