Page 1 of 1

PHP file not found

PostPosted: 01. April 2011 08:20
by jonhinton
I am just getting started with web programming and need some help. I am getting this message on firefox with this https://localhost/xampp/www/php/first.php . Can someone give me some clues as to where to look or what to do?

Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
4/1/2011 1:49:34 AM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

Re: PHP file not found

PostPosted: 01. April 2011 08:38
by Sharley
Where is this first.php file located on your hard drive?

The location I see from the URI you type in your browser is C:\xampp\htdocs\xampp\www\php\first.php is that correct?

Read the \xampp\apache\logs\error.log file which will have more details than the standard error message from your browser.

Re: PHP file not found

PostPosted: 01. April 2011 12:24
by jonhinton
When I went to the error log I found this:
[Fri Apr 01 06:11:46 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/www

So I moved the www directory into C:/xampp/htdocs and it worked the php program ran. So I would assume that (https://localhost/www/php/hello.php) where //localhost/ refers to the C:/xampp/htdocs/ directory. Is this set in an ini file somewhere?

Thanks for the response.

Re: PHP file not found

PostPosted: 01. April 2011 16:09
by WilliL
jonhinton wrote:So I moved the www directory into C:/xampp/htdocs and it worked the php program ran. So I would assume that (https://localhost/www/php/hello.php) where //localhost/ refers to the C:/xampp/htdocs/ directory. Is this set in an ini file somewhere?
.

you'll find it in C:/xampp/apache/conf/httpdconf.ini approx. line 183.
But I suggest you not to change this. Perhaps use ask in future for support and everyone thinks you're using standard.

If you like to have another folder for projekts you have to learn about vhosts.
Configuration file: C:/xampp/apache/conf/extra/httpd-vhosts.conf, is automatical included

In this case please read carefully and complete http://httpd.apache.org/docs/2.0/en/vhosts/, use forum search (there are a lot of excamples and hints too

Re: PHP file not found

PostPosted: 01. April 2011 17:27
by jonhinton
Ok Thanks for the help. I guess I will be reading this weekend.