Page 1 of 2

Newbie question...

PostPosted: 19. October 2007 05:21
by Uchiha John Ryan
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.

PostPosted: 19. October 2007 05:35
by Wiedmann
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.

PostPosted: 19. October 2007 05:47
by Uchiha John Ryan
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.

PostPosted: 19. October 2007 05:59
by Wiedmann
What's the URI you are using in your browser?

"error.log"?

PostPosted: 19. October 2007 06:15
by Uchiha John Ryan
Actually, I do not know what URI is. :oops: Where can I check it?

PostPosted: 19. October 2007 06:23
by Wiedmann
Actually, I do not know what URI is.

http://en.wikipedia.org/wiki/URI

PostPosted: 22. October 2007 03:43
by Uchiha John Ryan
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?

PostPosted: 22. October 2007 04:14
by Wiedmann
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?

PostPosted: 22. October 2007 04:17
by Uchiha John Ryan
..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.

PostPosted: 22. October 2007 04:19
by Uchiha John Ryan
I posted the reply before reading your message.. Sorry..

PostPosted: 22. October 2007 04:34
by Uchiha John Ryan
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

PostPosted: 22. October 2007 04:39
by Uchiha John Ryan
By the way, my customized folder is Conel..

PostPosted: 22. October 2007 04:41
by Wiedmann
'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..

:?:

PostPosted: 22. October 2007 04:50
by Uchiha John Ryan
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.

PostPosted: 22. October 2007 04:56
by Wiedmann
'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"