Jump to content

Recommended Posts

I'm trying to learn PHP.  So, I've installed PHP on a server at work.  The install (from the msi file) went without a hitch, I setup a new site in IIS and uploaded a few test pages (html and php).

The html test page loads fine, but if I try to open the .php test page I made ('hello world' type code, copied from a tutorial) I get a 'Page can not be displayed' error, as if the file wasn't there, which it is. 

To narrow the problem down a bit, I changed the contents of the html test file so that it included a php script (again, copied from a tutorial site), this time it loaded, but only displayed the html elements, ignoring the php part.

 

I've done a search and it seems a few people have had this problem, but slightly different, or unsolved.

 

Here's some more info based on what I've seen from the other topics:-

 

  • The server is running Windows Server 2003 Standard edition (so, IIS 6.0) with Exchange Server 2003
  • In IIS manager > Web Service Extensions, says that 'PHP Hypertext Processor' is allowed.
  • I do have permissions to open php.exe.
  • I've reinstalled multiple times trying 'IIS CGI' and 'IIS ATAPI' in the installation.  (I am using the IIS CGI setup currently).

 

Does anyone have any suggestions?  Please don't suggest using Apache, as it's a work server and I don't want to install anything that isn't necessary,PHP being the exception ;).

 

Thanks in advance for any help with this.

Link to comment
https://forums.phpfreaks.com/topic/69890-404-on-php-files/
Share on other sites

Upon playing with things I don't understand, I have made it work (sort of).  However, I had to allow 'All unknown CGI extensions' and 'All unknown ISAPI extensions' for it to work (which I don't want to leave allowed), and even then it's temperamental.  Sometimes it will display the .php file properly, processing the entire script, sometimes the page will simply say "The directory name is invalid."

 

Further info:-

Prohibiting 'All unknown CGI extensions' and allowing 'All unknown ISAPI extensions' results in a 'Oage cannot be found' error, as in my original post.

Prohibiting 'All unknwon ISAPI extensions' and allowing 'All unknwon CGI extensions' results in the 'The directory name is invalid." message every time.

 

Anyone?  It works perfectly fine on my XP desktop machine running IIS, but I need it to work on the server.

Link to comment
https://forums.phpfreaks.com/topic/69890-404-on-php-files/#findComment-354830
Share on other sites

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.