New to PHP -- Install problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
jbm417
Forum Newbie
Posts: 2
Joined: Mon Aug 31, 2009 8:42 pm

New to PHP -- Install problem

Post 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
Paul_F
Forum Newbie
Posts: 10
Joined: Sat Aug 29, 2009 6:17 pm

Re: New to PHP -- Install problem

Post 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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: New to PHP -- Install problem

Post by Benjamin »

:arrow: Moved to Installation and Configuration
jbm417
Forum Newbie
Posts: 2
Joined: Mon Aug 31, 2009 8:42 pm

Re: New to PHP -- Install problem

Post 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
Post Reply