Windows 2003 Server, IIS6 and PHP5 (grrr)

Soldato
Joined
11 Apr 2004
Posts
19,886
Hi guys,

I'm trying (and having great difficulty) to get PHP5 to work alongside IIS6 on my server. I've ran Apache2 before and had absolutely no problems but of course, trust Microsoft to make things easy :rolleyes:

Basically, I've tried an automatic install (both ISAPI and CGI) and I was getting a 404 error when trying to open PHP files. Managed to sort that out and set about installing phpBB but it wouldn't get past the first screen (didn't appear to be executing the code).

Removed all traces of PHP and did a manual install (checked against several guides on the net to make sure I wasn't missing anything out). For some reason, when I try and open a PHP file in the browser, I get a dialog box asking for a username and password.

None of the user accounts I've tried work (not even Administrator) and I've checked all files associated with PHP aswell as the files in the wwwroot folder to make sure access is granted. I've even tried giving the IUSR_servername account access to them to no avail.

I've come across quite a lot of info on the internet about ther people having similar problems but with no real fix. Has anyone got any ideas before I forget about IIS and go back to Apache.

Cheers :)
 
I had the same problem. Check in the IIS setting for something about Extenstions you have to enable PHP extenstion. It's not the bit whats in all the guides. Can't check atm dont have IIS installed on this machine.

Its normally where the red line is and its called Extensions iirc, cant remember exactly

 
Last edited:
That's already configured :(

iisphplb3.jpg


The php.ini file is pointing to the correct directories and the php directory is set in the system's path variable so there's no problem with IIS locating the PHP executables.
 
Hmm i'll have too check at work tomorrow and post back because i remember when setting it up we did all the things it told us too, but still didnt work and we had to enable something.

Vampy
 
That'd be cool. Thanks very much for the help :)

From a quick search on Google, it seems to be a common problem with IIS.

Just taken a screenshot of the password prompt and error message, not that it's probably any help but thought it was worth a shot.

password.jpg
 
Yep. Even tried adding permissions for the IUSR user to several different files.

I'm going to try changing the password on that account. AFAIK it's just a random generated password when IIS is installed isn't it?

edit... No change :(
 
Last edited:
Have you checked the permissions on the web folders itself? I had to fix ASP scripting today and im sure on thing I came across was PHP/IIS

Will see if i can find it again and if its relevant I will post it for you.

Edit: found this, it is about a year old, but might help you

How you installed PHP ? From zip files or installer package ?

It is easy to install with installer package.

For php 4, download

http://www.php.net/get/php-4.4.4-installer.exe/from/a/mirror

and install it. On installation, you need to select IIS 6 as web server.
 
Do you mean this...

foldersecuritygx2.jpg


Or the Security tab that you get by right clicking the folder in Explorer?

In response to your edit, I did try the MSI installer at first but that was giving me a 404 error when I tried to open a PHP file. I managed to get PHP working at one point but when trying to do a test install of iBB (Invision Bulletin Board), it wouldn't proceed past the 'Welcome' screen (PHP file which loaded another PHP file on clicking a button).
 
Last edited:
is a permissions error on php5isapi.dll (If you manually did the install and if you used isapi). You need to make sure ISUR_XXXXX is added to the permissions of the PHP directory and the php5isapi.dll file in system files.

EDIT: These are the following "MANUAL" installs I used

mysql-noinstall-5.0.41-win32.zip
php-5.2.3-Win32.zip
phpMyAdmin-2.10.2-english.zip
smf_1-1-2_install.zip
wordpress-2.2.zip
simpleauth-1.3.tar.gz


Hope this works for you!
 
Last edited by a moderator:
zen62619 said:
is a permissions error on php5isapi.dll (If you manually did the install and if you used isapi). You need to make sure ISUR_XXXXX is added to the permissions of the PHP directory and the php5isapi.dll file in system files.

I thought you were onto something there. I know I'd already added the IUSR user to the php5isapi.dll file, but wasn't sure about the PHP directory. Went and checked and I hadn't, so I added it and crossed my fingers.

Still exactly the same :(

I'd also given the IUSR user rights to the wwwroot directory and the php.ini file so I can't understand it. Should I try the CGI instead?

madman045 said:
I take it your MySQL and PHP installs went ok?

MySQL seemed to install fine (no error messages). The previous PHP MSI install also completed fine and like I said, I *could* access PHP files. The problem was that links within the file didn't work.

Cheers for the help guys. Much appreciated.
 
agw_01 said:
I thought you were onto something there. I know I'd already added the IUSR user to the php5isapi.dll file, but wasn't sure about the PHP directory. Went and checked and I hadn't, so I added it and crossed my fingers.

Still exactly the same :(

I'd also given the IUSR user rights to the wwwroot directory and the php.ini file so I can't understand it. Should I try the CGI instead?



MySQL seemed to install fine (no error messages). The previous PHP MSI install also completed fine and like I said, I *could* access PHP files. The problem was that links within the file didn't work.

Cheers for the help guys. Much appreciated.

no dont use the CGI isapi is a better code to use personally. Its definatly a permissions error I no that!

EDIT: Have you edited the PHP file?

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\PHP\ext"

; cgi.force_redirect configuration below
doc_root = "C:\Inetpub\wwwroot"
 
Last edited by a moderator:
Yep, did that earlier :)

It's in both the Windows directory and also in the PHP directory. There's also a PATH variable pointing to the PHP directory.
 
agw_01 said:
Yep, did that earlier :)

It's in both the Windows directory and also in the PHP directory. There's also a PATH variable pointing to the PHP directory.


System Variable????

C:\PHP;C:\PHP\ext:C:\MYSQL\BIN <<<<< THAT
 
Yep, that's the one.

I also created a PHPRC variable which points to c:\php

I didn't have 'c:\php\ext' in the system variable so have just added it and it's made no difference.
 
agw_01 said:
Yep, that's the one.

I also created a PHPRC variable which points to c:\php

I didn't have 'c:\php\ext' in the system variable so have just added it and it's made no difference.

php5ts.dll << permissions set right IUSR_XXXXX (system32)
 
Yep, the php5ts.dll file also has permissions for the IUSR user.

Should any of these files be in the system32 folder (your comment made me think about that).

They're all in the PHP folder.
 
agw_01 said:
That's already configured :(

iisphplb3.jpg


The php.ini file is pointing to the correct directories and the php directory is set in the system's path variable so there's no problem with IIS locating the PHP executables.


i spy ................................ you have isapi prohibited ;) (ALL Unknown ISAPI Extensions) set it to allow..
 
Back
Top Bottom