ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have installed LAMP Server on Ubuntu 7.10. And I have edited the file available in /etc/apache2/sites-enabled/000-default, changing document root form /var/www to /home/guest/www and then I restarted the server and started executing the my PHP files, I got the following error/warning
Quote:
Warning: include(common/header.php) [function.include]: failed to open stream: Permission denied in /home/guest/www/index.php on line 1
Warning: include() [function.include]: Failed opening 'common/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/guest/www/index.php on line 1
Warning: include(common/footer.php) [function.include]: failed to open stream: Permission denied in /home/guest/www/index.php on line 2
Warning: include() [function.include]: Failed opening 'common/footer.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/guest/www/index.php on line 2
Files are available in the folder and I changed the permissions to 777, but still I am not able to execute. Please help me.
First changing a folders permission to 777 is never advisable...
is common/footer.php in the path given if not then correct the path is so then I would suspect that the web server Apache doesn't have permission to a parent folder /home/guest
Thank You for the reply. My www folder contains folders common, configure, pics, css and javascripts along with my index.php file. index.php file contains the code
The web server needs access permission for all parent directories on path /home/guest/www. I assume that 'guest' is a user's home directory (user guest), so you probably have to add user 'apache' to the 'guest' group, or make some sudo settings that have a similar effect.
Anyway, my advice would be to reset webroot to /var/html and rather create the 'guest' home directory within /var/html. In httpd.conf set up a virtual host with the guest home directory or one of it's subdirectories as the webroot for that given virtual host.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.