object not found when trying to run php file

Problems with the Windows version of XAMPP, questions, comments, and anything related.

object not found when trying to run php file

Postby howardarbutus » 20. March 2009 03:06

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.
howardarbutus
 
Posts: 2
Joined: 20. March 2009 02:54

Re: object not found when trying to run php file

Postby Izzy » 20. March 2009 03:10

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.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: object not found when trying to run php file

Postby howardarbutus » 20. March 2009 03:22

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.
howardarbutus
 
Posts: 2
Joined: 20. March 2009 02:54

Re: object not found when trying to run php file

Postby Izzy » 20. March 2009 03:28

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.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: object not found when trying to run php file

Postby orejazz » 01. April 2009 01:20

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
orejazz
 
Posts: 5
Joined: 01. April 2009 00:08

Re: object not found when trying to run php file

Postby Izzy » 01. April 2009 01:28

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?
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: object not found when trying to run php file

Postby orejazz » 01. April 2009 02:01

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
orejazz
 
Posts: 5
Joined: 01. April 2009 00:08

Re: object not found when trying to run php file

Postby orejazz » 01. April 2009 14:57

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
orejazz
 
Posts: 5
Joined: 01. April 2009 00:08

Re: object not found when trying to run php file

Postby Izzy » 01. April 2009 22:47

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.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: object not found when trying to run php file

Postby orejazz » 02. April 2009 00:02

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
orejazz
 
Posts: 5
Joined: 01. April 2009 00:08

Re: object not found when trying to run php file

Postby orejazz » 02. April 2009 00:06

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
orejazz
 
Posts: 5
Joined: 01. April 2009 00:08

Re: object not found when trying to run php file

Postby Izzy » 02. April 2009 00:08

Look in the C:\xampp\apache\logs\error.log file and see what it says about file not found errors.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 117 guests