Page 1 of 1

object not found when trying to run php file

PostPosted: 20. March 2009 03:06
by howardarbutus
Dear all:
I get the following error when I tried to run a file in "htdoc" file of xampp.

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


I tried to open the file in internet explorer by "file", "open", and is able to fine the file just fine.
I am a newbie and would appreciate the help.
Thanks in advance.

Re: object not found when trying to run php file

PostPosted: 20. March 2009 03:10
by Izzy
Use http://localhost/yourphpfile.php as opening a file will not work as the server needs to parse the file.


Also check in the xampp\apache\logs\error.log file for the file not found error and correct if appropriate.

Re: object not found when trying to run php file

PostPosted: 20. March 2009 03:22
by howardarbutus
Checked the error log with the following error:

[Thu Mar 19 19:04:28 2009] [error] [client 127.0.0.1] script 'C:/xampp/htdocs/xampp/f.php' not found or unable to stat

I put the f.php file in C:/xampp/htdocs/xampp/ file and the internet explorer found it. Thanks. That solves my problem. Many thanks.

Re: object not found when trying to run php file

PostPosted: 20. March 2009 03:28
by Izzy
howardarbutus wrote:Checked the error log with the following error:

[Thu Mar 19 19:04:28 2009] [error] [client 127.0.0.1] script 'C:/xampp/htdocs/xampp/f.php' not found or unable to stat

I put the f.php file in C:/xampp/htdocs/xampp/ file and the internet explorer found it. Thanks. That solves my problem. Many thanks.
Your welcome.

File f.php in C:\xampp\htdocs folder has an address of http://localhost/f.php
File f.php in C:\xampp\htdocs\xampp folder has an address of http://localhost/xampp/f.php

Hope this helps.

Re: object not found when trying to run php file

PostPosted: 01. April 2009 01:20
by orejazz
Izzy wrote:
howardarbutus wrote:Checked the error log with the following error:

[Thu Mar 19 19:04:28 2009] [error] [client 127.0.0.1] script 'C:/xampp/htdocs/xampp/f.php' not found or unable to stat

I put the f.php file in C:/xampp/htdocs/xampp/ file and the internet explorer found it. Thanks. That solves my problem. Many thanks.
Your welcome.

File f.php in C:\xampp\htdocs folder has an address of http://localhost/f.php
File f.php in C:\xampp\htdocs\xampp folder has an address of http://localhost/xampp/f.php

Hope this helps.


Dear friends, i had tryied to follow these steps, but i can't run any page (.htm or .php)

Regards

Joe

Re: object not found when trying to run php file

PostPosted: 01. April 2009 01:28
by Izzy
orejazz wrote:i had tryied to follow these steps, but i can't run any page (.htm or .php)
What version of XAMPP?
What version of Windows?
Both omitted.

What do you see when you go to http://localhost in your browser?

Re: object not found when trying to run php file

PostPosted: 01. April 2009 02:01
by orejazz
Izzy wrote:
orejazz wrote:i had tryied to follow these steps, but i can't run any page (.htm or .php)
What version of XAMPP?
What version of Windows?
Both omitted.

What do you see when you go to http://localhost in your browser?


I am really sorry... Xampp 1.7.0 and Windows XP, and the error is:

Object not found!

Error 404
localhost
03/31/09 19:51:08
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8

Thanks all your help

Joe

Re: object not found when trying to run php file

PostPosted: 01. April 2009 14:57
by orejazz
Hi Izzy, thanks for all your help.
When i had run htt://localhost
I get:

Index of /
Name Last modified Size Description
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 Server at localhost Port 80


is it enough information?

Thanks before hand

Joe

Re: object not found when trying to run php file

PostPosted: 01. April 2009 22:47
by Izzy
You have deleted files in the xampp\htdocs folder?

There should be an index.php and an index.html file and some images.
Also 3 folders xampp, restricted and forbidden.

You can still access the XAMPP Welcome page by going to http://localhost/xampp/ in your browser.

Re: object not found when trying to run php file

PostPosted: 02. April 2009 00:02
by orejazz
Hello Izzy, I had restored index.htm and index.php on C:\xampp\htdocs. I can run just one of both: the index.htm ; I can't run index.php the error 404 persist.
The dirctory has the refered sub-directories: Forbiden, Restricted, Xampp, some pictures and a new directory added by me (www - following some recomendations I read before).

When i run http://localhost/xamppI saw the ERROR 404 again

Error 404
localhost
04/01/09 18:32:16
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8

Thanks for your help

Joe

Re: object not found when trying to run php file

PostPosted: 02. April 2009 00:06
by orejazz
Hey Izzy, good news... I had moved index.htm and index.pho to my new folder www, and finally can see both pages.

Thanks for all your help, you are really great!!

Joe

Re: object not found when trying to run php file

PostPosted: 02. April 2009 00:08
by Izzy
Look in the C:\xampp\apache\logs\error.log file and see what it says about file not found errors.