Newbie question...

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

Newbie question...

Postby Uchiha John Ryan » 19. October 2007 05:21

Hi.

I downloaded XAMPP to learn PHP. I was able to follow the first part of the installation documentation and successfully viewed the localhost page (to check Apache). But when I tried viewing a PHP script through the localhost, the page prompted an "Object not found" error. I copied the same sample PHP script from the documentation and saved it in the default folder (xampplite\htdocs). Is there something else that I've missed out?

Thank you very much in advance.
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 19. October 2007 05:35

But when I tried viewing a PHP script through the localhost, the page prompted an "Object not found" error.

Then you are not using the correct URI for that script, or that script is not at the correct place.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Uchiha John Ryan » 19. October 2007 05:47

I copied the installation files in E:\CustomizedFolder\xampplite\ and saved the .php file in E:\CustomizedFolder\xampplite\htdocs\.

The .php file I copied from the documentation was:

<!DOCTYPE html PUBLIC "_//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Hello World</title>
</head?

<body>
<p><?php echo "Hello World"; ?></p>
</body>

</html>



Is there anything wrong with it?

Thank you very much for your reply. I really appreciate it.
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 19. October 2007 05:59

What's the URI you are using in your browser?

"error.log"?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Uchiha John Ryan » 19. October 2007 06:15

Actually, I do not know what URI is. :oops: Where can I check it?
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 19. October 2007 06:23

Actually, I do not know what URI is.

http://en.wikipedia.org/wiki/URI
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Uchiha John Ryan » 22. October 2007 03:43

Sorry I wasn't able to reply last time.. I checked the link that you gave me and I'm not sure if I got it right. The address that I typed in on the address bar is http://localhost/helloWorld.php. Is that the URI?
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 22. October 2007 04:14

I copied the installation files in E:\CustomizedFolder\xampplite\

OK, to be sure that's really your DocumentRoot... Open "http://localhost/xampp/phpinfo.php" and search for "DOCUMENT_ROOT":
--> Is this "E:\CustomizedFolder\xampplite\htdocs"?

and saved the .php file in E:\CustomizedFolder\xampplite\htdocs\
...
The address that I typed in on the address bar is http://localhost/helloWorld.php

Now open a command prompt (cmd.exe) and execute this command:
Code: Select all
dir "E:\CustomizedFolder\xampplite\htdocs\helloWorld.php"

--> What's the output?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Uchiha John Ryan » 22. October 2007 04:17

..I also checked the error log and found this:

[Mon Oct 22 11:16:50 2007] [error] [client 127.0.0.1] script 'E:/CustomizedFolder/xampplite/htdocs/helloWorld.php' not found or unable to stat

I'd really appreciate your help.
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Uchiha John Ryan » 22. October 2007 04:19

I posted the reply before reading your message.. Sorry..
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Uchiha John Ryan » 22. October 2007 04:34

The value for DOCUMENT_ROOT is E:/Conel/xampplite/htdocs. When I tried running it on the command prompt, I got the message: 'helloWorld.php' is not recognized as an internal or external command, operable program or batch file
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Uchiha John Ryan » 22. October 2007 04:39

By the way, my customized folder is Conel..
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 22. October 2007 04:41

'helloWorld.php' is not recognized as an internal or external command, operable program or batch file

Please use exact this comand in the shell (one line):
Code: Select all
dir "E:\CustomizedFolder\xampplite\htdocs\helloWorld.php"


(And not only "helloWorld.php").

By the way, my customized folder is Conel..

:?:
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Uchiha John Ryan » 22. October 2007 04:50

I got the following message:
'E:\Conel\xampplite\htdocs\helloWorld.php' is not recognized as an internal or external command, operable program or batch file.
Uchiha John Ryan
 
Posts: 10
Joined: 19. October 2007 04:27

Postby Wiedmann » 22. October 2007 04:56

'E:\Conel\xampplite\htdocs\helloWorld.php' is not recognized as an internal or external command, operable program or batch file.

Wiedmann wrote:dir "E:\CustomizedFolder\xampplite\htdocs\helloWorld.php"
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 144 guests