Can someone help me with installing PHP on a win2k machine?

Gorgonzola

Golden Member
Nov 22, 1999
1,300
0
76
well im started to get bored with HTML, so i decided i wanted to learn something a little more complex. i have a magazine (australian personal computer) here that has an introduction to PHP. i followed their instructions (and the readme instructions) for installing it, but when i try out a test page, the PHP portion of the page doesn't appear.

i copied the approriate files into c:\winnt\system32 and also made sure that php.ini had the correct diretories. i shutdown IIS using the cmdline commands, then started it up again. then i made a page with just this in it:

<html>
<body>
<?
$testText = &quot;PHP installation was successful&quot;;
print $testText;
?>
</body>
</html>

but when i load it in the browser, all i see is a white page, which obviously means that the PHP is being ignored.

does anyone have any ideas for what options i may have screwed up? or had this problem before?

thanks
 

PliotronX

Diamond Member
Oct 17, 1999
8,883
107
106
I'm not entirely sure IIS supports PHP. I've no experience with PHP (yet), but I don't think IIS can utilize PHP. MS wants to force ASP on everyone.
 

Gorgonzola

Golden Member
Nov 22, 1999
1,300
0
76
heres a bit from the readme:

Requirements
------------

- Windows 95 or later, Windows NT 4.0 or later
- ISAPI 4.0 compliant Web server required for ISAPI module (tested on IIS 4.0,
PWS 4.0 IIS 5.0). IIS 3.0 is *NOT* supported; You should download and
install the Windows NT 4.0 Option Pack with IIS 4.0 if you want native PHP
support.


so i just assumed that it supported it.
 

Workin'

Diamond Member
Jan 10, 2000
5,309
0
0
Unless you set your php.ini file to use non-default escape tags you have to code it like so:

(HTML stuff)
<?php echo &quot;Now I am using PHP&quot; ?>
(HTML stuff)

You can download the latest version of PHP (4.04) and a gigantic user guide from the PHP Home Page. I use the CGI version not the ISAPI module. You can also download a version of PHP that uses an installer and sets everything up for you - no monkeying in the registry, no starting and stoppin IIS, etc.
 

Gorgonzola

Golden Member
Nov 22, 1999
1,300
0
76
yeh i tried the code with the <?php instead of just <? and it still didn't work, so i must have screwed something up somewhere. can you briefly describe the difference between the cgi and the isapi modules?

i'll go and find the windows installer. should make it a tad easier :)

thanks.
 

Gorgonzola

Golden Member
Nov 22, 1999
1,300
0
76
well, i just got the windows installer and blammo! it worked :D i also got the uber huge manual, so i should now be able to avoid asking stupid questions (that doesn't rule out semi-stupid questions though! :)).

thanks for the tip.