I'm a php newbie. I have installed apache 2.0.54 and php 5.0.5 on my
win2k box. However, it does not appear the php is working properly. I
base this on the following code(which I got from a book):
<html>
<head>
<title>Listin g Server Variables</title>
</head>
<body>
<h2>PHP and HTML</h2>
<P>Server Variables</P>
<?php
$envs = array ("HTTP_REFERER" , "HTTP_USER_AGEN T", "REMOTE_ADD R",
"REMOTE_HOS T", "QUERY_STRI NG", "PATH_INFO" );
foreach ($envs as $env)
print "$env: $GLOBALS[$env]<br>";
?>
</body>
</html>
All I get when I access via: http://localhost/phptest1.html is:
PHP and HTML
Server Variables
"; ?>
So, my first question is "Do these versions of software play well
together?" If so, where do I look first? I have added the following
lines to httpd.conf:
LoadModule php5_module "C:/php5/php5apache2.dll "
PHPIniDir "C:/php5"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
I took the php.ini.recomme nded, changed the name to php.ini, then
changed doc_root as follows:
doc_root = "C:\Program Files\Apache Group\Apache2\h tdocs"
If these versions will play together, then what have I overlooked in
the install? Any help, comments, suggestions, are welcome.
Bill W
win2k box. However, it does not appear the php is working properly. I
base this on the following code(which I got from a book):
<html>
<head>
<title>Listin g Server Variables</title>
</head>
<body>
<h2>PHP and HTML</h2>
<P>Server Variables</P>
<?php
$envs = array ("HTTP_REFERER" , "HTTP_USER_AGEN T", "REMOTE_ADD R",
"REMOTE_HOS T", "QUERY_STRI NG", "PATH_INFO" );
foreach ($envs as $env)
print "$env: $GLOBALS[$env]<br>";
?>
</body>
</html>
All I get when I access via: http://localhost/phptest1.html is:
PHP and HTML
Server Variables
"; ?>
So, my first question is "Do these versions of software play well
together?" If so, where do I look first? I have added the following
lines to httpd.conf:
LoadModule php5_module "C:/php5/php5apache2.dll "
PHPIniDir "C:/php5"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
I took the php.ini.recomme nded, changed the name to php.ini, then
changed doc_root as follows:
doc_root = "C:\Program Files\Apache Group\Apache2\h tdocs"
If these versions will play together, then what have I overlooked in
the install? Any help, comments, suggestions, are welcome.
Bill W
Comment