Page 1 of 1

New to PHP -- Install problem

Posted: Mon Aug 31, 2009 8:56 pm
by jbm417
I am new to PHP. Just installed 5.2.8 on Win Server 2003 running IIS6.

Followed the instructions as per:

http://webcheatsheet.com/php/install_an ... #iisconfig

Created the classic php test file containing
<?php phpinfo() ?>

and placed the file in inetpub/wwwroot -- same place as the 2 html files listed below.

I can access 2 pages on the default web site with http://localhost/iisstart.htm & http://localhost/postinfo.html.

However, when I try http://localhost/test.php I get an error

HTTP error 404 file or directory not found
IIS

I have looked at the obvious such a name spelling, etc. Even copied the
test file to x.php still no luck.

Can anyone help? TIA - Joe

Re: New to PHP -- Install problem

Posted: Tue Sep 01, 2009 7:07 am
by Paul_F
I don't use IIS for php, but it stands to reason that the conf file would need to be setup to point at it's directories if I did. I did a real quick peruse of those install directions you mentioned and I didn't see anything about setting up that portion of the conf file (I could have missed it).

Anyway, check the following:

Check the DocumentRoot in your httpd.conf file to make sure it's pointing at C:\Inetpub\webroot and not C:\Program Files\Apache Software Foundation\Apache2.2\conf. Also look for a line in your conf file that looks like this: "# This should be changed to whatever you set DocumentRoot to". Underneath that line you'll see a <Directory C:\Program Files\Apache Software Foundation\Apache2.2\conf> statement. That directory should also point to C:\Inetpub\wwwroot.

Also, there are some install instructions here. I think Zend has some good install/configure instructions too. They might be worth checking out.

Good luck!
Paul

Re: New to PHP -- Install problem

Posted: Tue Sep 01, 2009 7:22 am
by Benjamin
:arrow: Moved to Installation and Configuration

Re: New to PHP -- Install problem

Posted: Tue Sep 01, 2009 8:37 pm
by jbm417
Thanks for the various links. After reading these I was able to get the configuration completed and now have a successful test.

The last problem I encountered may be obvious to the seasoned user, but it took me a while to puzzle it out so if anyone else encounters:

Instead of displaying the php info as expected, I simply got a blank page -- no http errors -- just a blank page.

The problem was with the test.php contents: <? php phpinfo() ?> the problem

The space between ? p must NOT be there. <?php phpinfo() ?> correct

Again, thanks -- Joe