Warning: Unknown: failed to open stream: Permission denied i

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

Warning: Unknown: failed to open stream: Permission denied i

Postby Druid Healer » 14. March 2005 12:21

I placed a script in htdocs... and tried to run it in Opera but when I did, I got this message.

Code: Select all
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/opt/lampp/htdocs/abc_2.6.php' for inclusion (include_path='.:/opt/lampp/lib/php') in Unknown on line 0


There is nothing on the first line except <?... which i changed to <?php to make sure it wasn't that or something and the second line is just a comment.

I ran a hello world script on xampp and encountered the same message, until it stopped and restarted it. After that the hello script ran.

I know the the script that is encountering this error message works because I have tested it on a different server. It does not access the mysql database and the script has worked on xampp for windows.
Druid Healer
 
Posts: 4
Joined: 14. March 2005 12:12

Postby Oswald » 14. March 2005 18:52

Dear Druid!

I assume your file is not readable by the Apache. Try the following command:

chmod a+r /opt/lampp/htdocs/abc_2.6.php

Now reload the page and the error should disappear.

Greetings
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
XAMPP Version: 5.5.19
Operating System: Linux

Postby Druid Healer » 14. March 2005 23:49

Thanks a lot! I didn't realise it wasnt working because it was from a zip file with no permissions! :oops: Is there anyway to change the permissions of a lot of files at once?
Druid Healer
 
Posts: 4
Joined: 14. March 2005 12:12

Postby Oswald » 15. March 2005 00:22

Try

chmod -R a+rX /opt/lampp/htdocs

Changes the permission of all files in htdocs and every sub directory.

In most cases this should give the best results. (Upper case R and X are important!)

Greetings
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
XAMPP Version: 5.5.19
Operating System: Linux

Postby Druid Healer » 17. March 2005 17:36

It worked :D! Thnx!
Druid Healer
 
Posts: 4
Joined: 14. March 2005 12:12


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 1 guest