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 :)
 
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.
 
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:
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:
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.
 
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.
 
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.
 
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.
 
Yep, that's there.

Just tried a few more things, and nothing.

Might format tomorrow. See what happens when I install a fresh copy of Windows.

Stupid thing :(

edit... Nikumba, I'd appreciate anything you could find out for me :)
 
The php.ini file was already in the Windows directory. Just moved php5ts.dll to the system32 directory though.

And I made a file to call phpinfo earlier. Get exactly the same permissions problem though :confused:

Going to restart now... just incase.
 
Not used filemon before. Will give it a shot.

Weird one though... just restarted, and tried to access the phpbb install.php file.

It's brought up a "Page cannot be displayed" screen. Typical 404 page in IE. I've had this before. Does it for the phpinfo.php file I created previously too.
 
Could Active Directory be having an impact on IIS working as it should?

Preferably do need this machine as a domain controller.

Will format it, follow the procedure you've given and let you know. Thanks once again for the help, it's appreciated.
 
Last edited:
Running Server 2003 32-bit and no service pack.

:mad:

On a clean installation now. Only things installed are the drivers for my wireless adapter, ATi drivers, IIS and PHP.

I did try a manual install and got exactly the same error so I removed all traces and tried installing the MSI. Now I'm back to the 'Page cannot be found' stage when trying to open a PHP file.

:mad:

edit... :D Just checked IIS and under the properties for the Default website, Script source access wasn't ticked. Checked that box and just ran a test php file and it seems to have worked.

Going to hold my breath until I've got SQL working alongside it too.
 
Last edited:
marc2003 said:
did you read my link above? there's quite a bit more to it than just installing php and configuring iis. and don't use the installer. it sucks. use the zip. :)

No I didn't. Am looking now. Might give it a shot. Thanks :)

Just read your post. I'd already done everything there on my previous install. That's why I can't understand about the permission errors I was getting.

I'd checked the process against countless installation guides.
 
Last edited:
Is the PHPRC variable a necessity? I'm sure I created an entry but am just thinking... maybe I didn't put it in capitals.

It's defo working now though. Just tried the installers for both phpBB and iBB and they seem to be working as they should (despite not having SQL installed).

Going to dig deeper and see exactly what the PHP MSI changes during installation.
 
Sorry to bump, but I've just completed a manual install of PHP on a fresh 2003 SP2 installation.

Sure enough, I got this screen when trying to open PHP files in the browser...

password.jpg


So, after doing a bit of digging I found a bit of information and did the following...

The 'Default Web Site' was set to use an application pool called 'DefaultAppPool'. I went into the properties for this application pool, onto the Identity tab and changed from Predefined to Configurable. Obviously, the user IWAM_xxxxxx was already there so I just left it at that.

app-poolconfig.jpg


Then, I went to the security permissions for the PHP executable folder and added IWAM_xxxxxx as a permitted user with the appropriate access right.

phpdirsecurity.jpg


Lo and behold... it worked.

I've also found the following can cause some problems when installing with the PHP installer and worth a check if you're having difficulty getting pages to display.

phpconfig.jpg


The PHP exectuable tends to appear as a short 8.3 file name. I found entering the 'long' file name sorted out a permissions error I was getting.

Hope this thread is of use to anyone with the same problem in the future.
 
Back
Top Bottom