PHP with Apache..i need a very little help.
Posted: Sun Nov 09, 2003 4:07 pm
Hi,
After installaion i tried to test if my PHP is up and running with Apache 1.3.29.
So, i copied the following simple PHP code into a file that i named as hello.php and put this file inside default web root directory for apache
C:\Program Files\Apache Group\Apache\htdocs
Here is the code:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
and the tutorial [www.php.net ] where i got this code says i should get the following output if i go to my browser and type
http://localhost/hello.php
following output will make it to your browser:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
But i see nothing. yes i see nothing but a blank white page. I am sure it gets executed but why don't i get the output? i checked the view and source and i got the source code there.
I added the following 3 lines in my httpb.ini file:
AddModule mod_php4.c
LoadModule php4_module "c:/php/sapi/php4apache.dll"
AddType application/x-httpd-php .php
I added these line to make my php work as a module so that when my apache starts my php also gets up and running. You think i did any wrong in configuring httpb.ini file?
Do i have to add any additional line apart from these 3?
When i type http://localhost
I see that my apace is working. So, what's wrong then with my php?
After installaion i tried to test if my PHP is up and running with Apache 1.3.29.
So, i copied the following simple PHP code into a file that i named as hello.php and put this file inside default web root directory for apache
C:\Program Files\Apache Group\Apache\htdocs
Here is the code:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
and the tutorial [www.php.net ] where i got this code says i should get the following output if i go to my browser and type
http://localhost/hello.php
following output will make it to your browser:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
But i see nothing. yes i see nothing but a blank white page. I am sure it gets executed but why don't i get the output? i checked the view and source and i got the source code there.
I added the following 3 lines in my httpb.ini file:
AddModule mod_php4.c
LoadModule php4_module "c:/php/sapi/php4apache.dll"
AddType application/x-httpd-php .php
I added these line to make my php work as a module so that when my apache starts my php also gets up and running. You think i did any wrong in configuring httpb.ini file?
Do i have to add any additional line apart from these 3?
When i type http://localhost
I see that my apace is working. So, what's wrong then with my php?