Re: First PHP program not working

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

 



Hello Group,

Till yesteday, the .html file under htdocs were working fine under

http://localhost/index.html

but today the same URL

http://localhost/index.html gives 404 error.

My guess is that my apache web server is not working.

Can someone tell me

"How do I make sure that I am running Apache httpd server."

Besides, yesterday when my .html files were working under
http://localhost/URL, and .php files were not working the log says the
following.

#################
Apr 28 07:43:01 2009] [notice] Apache/2.2.11 (Win32) configured -- resuming
normal operations
[Tue Apr 28 07:43:01 2009] [notice] Server built: Dec 10 2008 00:10:06
[Tue Apr 28 07:43:01 2009] [notice] Parent: Created child process 1296
[Tue Apr 28 07:43:01 2009] [notice] Child 1296: Child process is running
[Tue Apr 28 07:43:01 2009] [notice] Child 1296: Acquired the start mutex.
[Tue Apr 28 07:43:01 2009] [notice] Child 1296: Starting 64 worker threads.
[Tue Apr 28 07:43:01 2009] [notice] Child 1296: Starting thread to listen on
port 80.
[Tue Apr 28 13:53:17 2009] [error] [client 192.168.1.104] File does not
exist: C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/crossdomain.xml
[Tue Apr 28 14:47:45 2009] [error] [client 127.0.0.1] File does not exist:
C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
#####################################

Can someone tell me what these two files are, what do they do, why are they
important, and why no liteature mentions about them.

Any help will be appreciated.

nagrik.

On Wed, Apr 29, 2009 at 4:32 AM, James Crow <james@xxxxxxxxxxxxx> wrote:

>  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
>
>


-- 
Thanks

Nagrik

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

  Powered by Linux