php works only with Xampp files

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

php works only with Xampp files

Postby davec » 18. June 2004 05:13

I just did the Xampp install on a windows 98 machine. All seems OK when I run from the 127.0.0.1 ip address and view the Xampp files for Status etc. Php seems to run ok.

When I want to view my own files (not in the Xampp directory or path) with php scripts inserted the html shows ok but the php scripts are not run and come through in the source.

I tried putting my files in the Xampp/htdocs directory and get Not Found errors.

Can someone help??

Thanks.
davec
 
Posts: 4
Joined: 18. June 2004 04:57
Location: USA

Postby Wiedmann » 18. June 2004 10:17

This is the normal behavior and not an error. You must access PHP files through the webserver. --> http://localhost/script.php
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Reply: Web page files not rendered by webserver

Postby davec » 18. June 2004 13:59

Yes.

Where do my web page files need to be located in order for the webserver to see them?

The webserver sees the xampp files in the xampp/htdocs directory but will not render my files when I place them there.

Am I not understanding the webserver directory structure?

Is it possible that modifications need to be made to php.ini etc.?
davec
 
Posts: 4
Joined: 18. June 2004 04:57
Location: USA

OK. One more question.

Postby davec » 18. June 2004 14:30

I think I determined where the files need to be. Files are being served from the C:\Xampp\htdocs\Xampp directory.

One more question,,,,,,,,,,,, Is there any way to change this behavior or do I need to use C:\Xampp\htdocs\Xampp as the webserver root directory and put all my work in a subdirectory of C:\Xampp\htdocs\Xampp?
davec
 
Posts: 4
Joined: 18. June 2004 04:57
Location: USA

Postby Wiedmann » 18. June 2004 14:40

All files should be served from "C:\Xampp\htdocs". So, all files must be in "htdocs" or a subdirectory inside "htdocs".

Look inside httpd.conf --> directive "DocumentRoot".

Test:
make a file named "testfile.php":
<?php echo 'XAMPP is working!'; ?>

Put this file in "C:\Xampp\htdocs".
Browse with IE to http://localhost/testfile.php

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

Thank you all

Postby davec » 18. June 2004 20:49

Thanks all for your help. I was not putting files in the proper subdirectory of Xampp.
davec
 
Posts: 4
Joined: 18. June 2004 04:57
Location: USA


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 35 guests