Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP, Win2k Advanced server, IIS 5 no workey!

Status
Not open for further replies.

PAEricksen

Technical User
Dec 8, 2001
59
US
I am new to php and I just installed php on my server. I used the 4.1.1 installer from for win32. No matter what I do I cannot get any output from my test php script. I tried naming the file test.html and test.php here is the content of the file :

<html><head><title>PHP Test</title></head>
<body>
<?php echo &quot;PHP is Enabled<p>&quot;; ?>
</body></html>
------------------------------------------------------------
when I view it from ie6 I get a blank page, if I view source I see the source.
------------------------------------------------------------
When I view it from cmd prompt I get :

<html><head><title>PHP Test</title></head>
<body>
PHP is Enabled<p></body></html>
------------------------------------------------------------
I have checked the 'configuration' section of my website and .php is there with (all) to run c:\php\php.exe

I also made the appropriate registry changes for command prompt (according to the install.txt file)

what are some things that I can look for to make my system run the script as I wish? Does anyone have any helpful information that I may have overlooked?

Thank You

Peter.
 
also, if I change the test file to just read :

<?php echo &quot;PHP is Enabled&quot;; ?>

I get the propper output on command line.
 
Go into Internet Services Manager, right-click the Default Web Site, select properties, click the Home Directory tab, click the Configuration button, on the App Mappings tab scroll the list to the bottom to the entry for php, select the php entry, click the edit button, and check the Check That File Exists option. Say okay to exit out. When prompted, apply the change to all of your websites.

You also have to give IUSR_yourmachinename execute permission to php.exe, php4ts.dll, and php4ts.lib.

Then make a page called phpinfo.php and have the following single line in it:
<?php phpinfo(); ?>
and try running it from your browser. That should list your configuration for you.
 
ok, when I call phpinfo.php from my web browser now I get the correct (I assume) response. Can I use php tags in .asp files (default.asp) or do my web pages need to be .php from now on to use php in them?

by the way, thanks for the help, I guess that the checking of the 'file exist' box did the trick, either that or I wasn't testing it right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top