View Full Version : PHP IIS using ISAPI
Krammeh
29th November 2007, 12:13
I can get PHP to install on IIS using the php_cgi with no problems, but this is not what I want to do.
I would rather run it using ISAPI - I feel that it would help with system resources!
Any chance anybody could guide me?
the_angry_angel
29th November 2007, 12:30
Easy-peasy, if you've already got PHP setup as CGI first remove that where appropriate (or modify as most of the stages are pretty much the same)
Open the IIS MMC (Start > Admin tools > IIS)
Goto the Web Service Extensions and click "Add a new web service extension"
Call it whatever you like ("PHP/ISAPI", "PHP-ISAPI", doesn't matter), and click add to add the path to the correct PHP ISAPI dll - php5isapi.dll for PHP5 obviously, etc.
Click the "allow this extension" tickbox and click OK
Expand the Web Sites tree and either go to the website or the directory you want to enable PHP on, and right click on it and go to properties
Go to the Directory tab, and click the "configuration" button
Click add and set the executable to the PHP ISAPI dll, and add .php as the extension. Limit the HTTP verbs if you wish. Make sure "script engine" and "verify.." is tick and click Ok
If you want to add phps, it's pretty much the same.
There was a problem with the ISAPI dlls a few releases ago, which meant you had to get the newer ones from snaps (snaps.php.net), but I believe that's fixed - I've not touched our work installation of PHP5ISAPI since it went in about 2 months ago though, so I can't remember exactly.
If you're still stucksies, and are around this evening I could give you a hand over MSN.
Krammeh
29th November 2007, 12:43
error: 500
Krammeh
29th November 2007, 12:49
now a 404. ffs.
Krammeh
29th November 2007, 13:04
grr.. now im getting "Invalid access to memory location. "....
the_angry_angel
29th November 2007, 13:33
grr.. now im getting "Invalid access to memory location. "....Restart IIS (as in the whole thing - restarting the IISAdmin service is more than enough as it'll take care of the whole lot in one go)
St4Lk3R
29th November 2007, 14:59
I would rather run it using ISAPI - I feel that it would help with system resources!
It's an awful lot faster if you run it via the new FastCGI extension. see here for further details:
http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1521
a user's story at Zend Devzone:
http://devzone.zend.com/article/2710-FastCGI-and-PHP-A-Users-Story
Krammeh
29th November 2007, 15:05
Restart IIS (as in the whole thing - restarting the IISAdmin service is more than enough as it'll take care of the whole lot in one go)
then it does server 500 :(
xaotik
29th November 2007, 15:16
Did you check your security settings?
Krammeh
29th November 2007, 15:17
Did you check your security settings?
its accessable via CGI - just not when in ISAPI :|. It only shows 500 when its on ISAPI
Krammeh
29th November 2007, 15:25
its driving me nuts. I give up
the_angry_angel
29th November 2007, 15:58
If you still want to do it, I'll be on MSN later - bug me there if you've not given up completely.
Krammeh
29th November 2007, 15:59
lol - ok.
What time are you going to be on, i'm off out soon.
I've put it back to standard CGI for now. I'll sort it with ya later :)
the_angry_angel
29th November 2007, 16:01
The ever accurate "when I've finished this quote completely" time :) Probably at least an hour..
St4Lk3R
29th November 2007, 18:26
*cough* fastcgi ftw! :)
Krammeh
5th December 2007, 11:42
finally got it to run on ISAPI mode, but mysql does not seem to be loaded :(. le sigh
Krammeh
5th December 2007, 14:26
gah - problem was it was attempting to use windows/php.ini when i thought it was php/php.ini :D. SOLVED! :D
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.