First PHP program not working
| From: | Vinay Nagrik | Date: | Tue, 28 Apr 2009 23:47:49 +0000 |
| Subject: | First PHP program not working | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-29287@lists.php.net to get a copy of this message | ||
Hello Group,
I am beginner to learning PHP and I am still struggling to start my first
php program.
I downloaded apache httpd sever, which resides on "Windows XP" under
C:\Program Files\Apache Software Foundation\Apache2.2
and directories therein.
Similarly the PHP download resides under
C:\Program Files\PHP
I have made following configuration changes to httpd file, which resides
under
C:\Program Files\Apache Software Foundation\Apache2.2\conf
although it does not show .conf extenstion, but I believe even without .conf
extension "Which is hidden", it is the appropriate conf file.
The changes
ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
LoadModule php5_module C:\Program Files\php\php5apache2_2.dll
PHPIniDir "C:\Program Files\php\"
AddType applicaton/x-httpd-php .php
for php.ini I made following changes
extension_dir = "C:\Program Files\PHP"
extension=C:\Program Files\MySQL\MySQL Server5.1\bin\libmySQL.dll
doc_root = "C:\Pogram Files\Apache Software Foundation\Apache2.2\htdocs"
I have also created a .php test program, which reads like
<? phpinfo(); ?>
and resides under htdocs directory under Apache installation.
The htdocs directory also has an html page.
The .html pages residing under htdpcs directory show themselves on following
URL, however .php pages do not
http://localhost/ shows "It Works"
http://localhost/index.html shows "It
Works"
However,
http://localhost/test.php shows
"404 error"
Can someone help me in configuring my httpd server for php files
--
Thanks
Nagrik