loading a script to Apache

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

loading a script to Apache

Postby fresher » 02. April 2007 18:34

Hello people, I have recently installed xampp on my linux box but having problems getting things to work write. I want to upload a small php script to the apache server and be able to access it from my web browser. Does anyone know how to do this please. many thanks in advance

PS: With Wamp i normally copy my php script into a 'www' folder and access it from a web browser typing something like this: http://localhost/www/script_name....
"Humanity to others..." - Ubuntu
fresher
 
Posts: 1
Joined: 02. April 2007 18:29

Postby Wiedmann » 02. April 2007 18:38

I want to upload a small php script to the apache server and be able to access it from my web browser.

Just put your script "foo.php" into the directory "/opt/lampp/htdocs/" and you can access it with "http://localhost/foo.php".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby morar » 11. April 2007 11:51

I put my php script in htdocs, but I still get a message about error like this: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/opt/lampp/htdocs/exdatis/first.php' (include_path='.:/opt/lampp/lib/php') in Unknown on line 0

I'am also using Ubuntu. :(
morar
 
Posts: 2
Joined: 11. April 2007 11:42

Postby Wiedmann » 11. April 2007 12:28

I put my php script in htdocs,

Well, for the test you have only used a script like this?
Code: Select all
<?php echo "I'm here :-)"; ?>
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby morar » 12. April 2007 12:51

Sorry, I'am a very stupid man!!!
Everything is OK, but if you just copy php script into folder htdocs you must give the privilegies to other users for view.
For other beginers see man chmod in command line tools. :oops: :oops: :oops:
morar
 
Posts: 2
Joined: 11. April 2007 11:42


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests