Link to home
Start Free TrialLog in
Avatar of dchew
dchew

asked on

404 Error received when testing PHP installation on Windows 2003 SP2 IIS6 Server

I am trying to get a PHP5 installation up and running on a Windows 2003 IIS6 server.  I have followed the instructions on the following two sites:  

http://www.adobe.com/devnet/dreamweaver/articles/php_iis.html#cgi
http://www.youtube.com/watch?v=17aAuMVippQ

I originally used the installer to install php5.2.5-win32-installer.msi and installed the application to C:\Program FIles\PHP.  I messed around with the instructions from the first link to install using CGI and not ISAPI and could not get anything to work.  

so I uninstalled PHP5 via control panel add/remove programs interface, deleted the PHP installation directory, deleted the web service extension as well as the Application Extensions in web sites properties/home directory tab.

Once I had everything uninstalled, I followed the instructions on the youtube video to a T and thought that they would work; but still nothing.

when i try to execute a simple .PHP script that just calls the PHPINFO function, I get the following error when trying to access the test.php file from a remote PC:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:

    * Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    * If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
    * Click the Back button to try another link.

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

Technical Information (for support personnel)

    * Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
    * Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.

IF I open up a browser on the server itself and try to access the same test.PHP script, i get the same error.


I have tried everything and am pulling my hair out.  Time to call in the experts!! :)
Any and all advice appreciated.  
Avatar of miqrogroove
miqrogroove
Flag of United States of America image

HTTP status 404 has nothing to do with PHP.  I suggest focusing on the IIS configuration and trying to retrieve a simple HTML file from the default website.
Avatar of dchew
dchew

ASKER

yes, i was thinking that something was up with the Default website.  problem is I have this PHP script placed in another website container that is having no issues whatsoever, and i can't pull it up there either.  

we did try to setup an SSL cert on the default website, and had some issues, now when on the server itself, when opening a browser to try and open Http://localhost/, I am gettting some errors, and have to login with credentials to view the index.html page.

As a general rule of thumb, one should only install a single service or application at a time and test it before proceeding.  I recommend undoing any changes made since experiencing "some issues" with SSL, then get SSL working or remove it, then proceed with these other issues one at a time instead of all at once.
Avatar of dchew

ASKER

also wanted to add that depending on little tweaks that I would try, (can go into more detail if needed) i sometimes would get a 500 server internal error as well.
Yeah dchew, it is unreasonable to troubleshoot what is going on with all the changes you've made when the server itself was not working to begin with.

Can you restore IIS to its original state as I suggested?
Also, I don't think you should be using Adobe and Youtube as your guide.  The correct and complete documentation is at http://www.php.net/manual/en/install.windows.php
Avatar of dchew

ASKER

i'm trying to avoid reinstalling IIS.  i was hoping someone here could give me at least some troubleshooting steps or things to test to see exactly what was causing the issue.  resoring iis would more than likely fix this problem, but it's a blanket approach, and i'm looking for something more specific.  there has got to be a way to resolve this php issue without having to restore iis from scratch.
As I mentioned in the first reply, there is only one applicable test:  Place a non-php file (such as txt or html) in the website's root folder.  If you receive status 404 or status 500 while attempting to access the non-php file through the website, then there is no diagnosable problem with php.
Avatar of dchew

ASKER

here is what I get when I place a simple txt file in the \INETPUB\WWWROOT directory and rename it to test.html.

The page must be viewed over a secure channel
The page you are trying to access is secured with Secure Sockets Layer (SSL).
--------------------------------------------------------------------------------

Please try the following:

Type https:// at the beginning of the address you are attempting to reach and press ENTER.
HTTP Error 403.4 - Forbidden: SSL is required to view this resource.
Internet Information Services (IIS)

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the words HTTP and 403.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled About Security, Secure Sockets Layer (SSL), and About Custom Error Messages.
Avatar of dchew

ASKER

if I do https://localhost/test.html, i get the following:

 There is a problem with this website's security certificate.
 
   
 The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.  
  We recommend that you close this webpage and do not continue to this website.  
  Click here to close this webpage.  
  Continue to this website (not recommended).  
     More information
 
Both of those errors are caused by IIS (not php) and can be eliminated by disabling SSL in the website configuration.
Avatar of dchew

ASKER

i can't do that because we have an SSL certificate setup for our OWA site, which is hosted off of the main default IIS site.  i.e. : http://defaultsite/OWA

The errors you mentioned only tell me that IIS is not working, which means there is no way to view PHP pages on this server.  If you can't work on resolving the IIS problems then there will be no resolution to the original question.
Avatar of dchew

ASKER

if that is my only option, then I am totally down with doing that.
i'm not trying to be difficult at all, just wanting to explore all possible options before wiping the iis installation as this is a production/live server.

so what is the next step?
Ideally, if you could disable the option that requires SSL on this website, that would be the next step.  I need you to be able to access a non-php file or tell me what other errors there are after accessing the non-SSL location.
Avatar of dchew

ASKER

so disabling ssl should be an option with the configuration container of the root IIS site?  possibly a checkbox somewheres?  if so, i'll start looking for it.
ASKER CERTIFIED SOLUTION
Avatar of miqrogroove
miqrogroove
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial