Page 1 of 1

PHP code always returns a blank browser page: IIS7, ISAPI

Posted: Tue Oct 13, 2009 4:55 pm
by dkrinkel
PHP newbie here. Have been banging my head against the wall for 2 days on this now.

I am trying to set up a test installation of PHP for development on my home computer. Windows Vista, sp2. IIS7. Installed PHP 5.2.11. Installed it both with the installer and with the zip. Very carefully configured the ISAPI script handler for the dll in IIS. Handler is working (I ran a command line test to confirm that php5isapi.dll is associated with *.php). I've walked through probably 5 different tutorials for configuring PHP with IIS. I've recreated the IIS server several times, to start from scratch. I've checked permissions on folders.

The problem is always the same -- when I try to access a test php (e.g. http://localhost/test.php), I always get a blank browser screen. Doesn't matter if the test file simply echos "Hello World", or runs the phpinfo() command, the resulting browser is still blank. No error messages, no log entries. I configured the php.ini to display errors, including start up errors. I set up an error log. Nothing appears in any of these.

I know IIS is finding the test.php file in the web site root directory, because if I put some html code in it, it works fine. But any code in between the <?php ..... ?> is ignored (or so it seems).

I'm sure it's some dumb thing I'm overlooking, but I can't find it.
Thanks,
Dave

Re: PHP code always returns a blank browser page: IIS7, ISAPI

Posted: Tue Oct 13, 2009 5:06 pm
by califdon
Since I've never used PHP with IIS, I won't be of much help, but I can at least tell you that you're doing the right things. The problem has to be with the configuration of IIS to recognize the PHP extension and to properly parse the code. I'm only familiar with Apache and its configuration file, but it has to have several lines, declaring the appropriate .dll module, etc. No doubt the same kind of thing has to happen with IIS, so it sounds like it's a configuration issue.