Help - Search - Members - Calendar
Full Version: need help setting up php5 on iis7
ieXbeta Board > Tech > Developer Center
adams73533
I've started playing around with server 2008 and want to start off by getting ii7 and php5 working. I've got iis7 installed and it appears to be working, but php5 won't work for some reason. I followed the directions here:
http://www.waxer.nl/?p=72

But when I put in http://localhost/phpinfo.php, I get a page not found. Can anyone recommend some things to try?

Thanks
Phonics Monkey
Page Not Found isn't a PHP error, it's a page isn't where it should be (or is named something else...) error.

Check for the basic stuff, botched permissiond, file not in correct folder, hidden extra file extension making file name phpinfo.php.txt, etc.
adams73533
Ok the phpinfo had the txt extension on it also, I removed that and made a few other changes and now I get this:

HTTP Error 500.0 - Internal Server Error
<handler> scriptProcessor could not be found in <fastCGI> application configuration
Phonics Monkey
500 series errors are usually permissions. Why is it asking for fastCGI anything if you only installed PHP? (I generally never use the installer)
adams73533
I didn't use the installer the first time but couldn't get it working then so I followed the directions on some website that used the installer and said to use fastCGI.

Let's say I was to setup server 2003 and iis6, do you think I would still be having these problems?
Phonics Monkey
IIS7 is extremely modular which may make the setup a tad more complicated, but I don't think it should be that much different ... But if there is a syntax error in the php.ini it can go poof on IIS6 also.

If I can get the time this weekend I'll have a go at setting it up on one of my test servers and post the results.
Phonics Monkey
Hm... Well, I used the same by hand method that I've always used in IIS6 and it worked fine for IIS7 on my Server 2008 test box. The ISAPI Extensions have their own directory by default which I use ... Instead of trying to asign IIS Execute permissions to some other part of the file system that will most likely leave holes in the box.

It's usually best not to fiddle with the permissions on that sort of thing if you want to have a prayer of a secure box (e.g. I never use the installer).


Here's a Snippet from my notes:
CODE
These are the Files & File Paths used for the MySQL db &
PHP Script support installation on IIS6 (and IIS7)

FOR PHP SUPPORT ONLY:

C:\Windows\php.ini
C:\Windows\System32\php5ts.dll
C:\Windows\System32\inetsrv\php5isapi.dll
---------------------------------------------------------

For PHP with MySQL Support ADD These Files:

C:\Windows\System32\libmysql.dll <-"Helper" File, Required for ANY of the Extensions to Work)
C:\Windows\System32\inetsrv\phpext\php_mysql.dll
---------------------------------------------------------

IF Using MS-SQL (Which Includes the MSDE Version) ADD These Files:

C:\Windows\System32\ntwdblib.dll
C:\Windows\System32\inetsrv\phpext\php_mssql.dll

NOTE: I'm not "Sure" if MS-SQL/MSDE Requires libmysql.dll as I've not had time to "test" the Theory.
      ...But it Couldn't Hurt to Throw it in ... Just to be on the "Safe Side"...;-)


NOTE: These additional Files are required (in these locations) to load & run the PHP_cURL.DLL module.

C:\Windows\System32\inetsrv\phpext\php_curl.dll
C:\Windows\System32\libeay32.dll
C:\Windows\System32\ssleay32.dll


From PHP.ini
CODE
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\WINDOWS\system32\inetsrv\phpext"

-and-

CODE
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.

;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll


Handler Mappings are/were setup just like in the tutorial you posted, except for the one part that it didn't mention which was to setup an ISAPI and CGI Restrictions Allow rule.

...and PHP werkz fine for me. wink2.gif
adams73533
Ok thanks I'll try it this afternoon. I forgot to turn the server on this morning before I left for work.
adams73533
Well I couldn't figure it out so I removed IIS and re-installed it.

Not sure what I did this time that was different, but I've got php5 setup now. Used this tutorial (had also used it one of the other times), http://www.thewebhostinghero.com/tutorials...server-pt2.html.

Now moving on to mysql.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.