Page 1 of 1

php works only with Xampp files

PostPosted: 18. June 2004 05:13
by davec
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.

PostPosted: 18. June 2004 10:17
by Wiedmann
This is the normal behavior and not an error. You must access PHP files through the webserver. --> http://localhost/script.php

Reply: Web page files not rendered by webserver

PostPosted: 18. June 2004 13:59
by davec
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.?

OK. One more question.

PostPosted: 18. June 2004 14:30
by davec
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?

PostPosted: 18. June 2004 14:40
by Wiedmann
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?

Thank you all

PostPosted: 18. June 2004 20:49
by davec
Thanks all for your help. I was not putting files in the proper subdirectory of Xampp.