Re: First PHP program not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vinay Nagrik wrote:
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
Error 404 is a standard web error. It does not come from php. When you look through Windows Explorer is the test.php file in the same folder as index.html? Something that may be helpful is to look at the Apache log. From your email it would appear to be located at C:\Program Files\Apache Software Foundation\Apache2.2\logs. There should be an error.log (but you may not see the log part of the filename) and an access.log.

First check to make sure that the test.php file is in the correct folder and then check the log files.

Thanks,
James


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux