开发者

Red Hat file include problem, PHP / APACHE

I have a Red Hat 开发者_运维问答Linux box that I did not configure but must get a custom PHP application working on it.

This is the error I am getting. I am essentially just trying to include include.php into a file test.php which resides in the same folder. I get the below error.

 Warning: require(include.php) [function.require]: failed to open stream: Permission denied in /var/www/html/test.php  on line 4

    Fatal error: require() [function.require]: Failed opening required 'include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/test.php on line 4

I have the folder permissions set to 755, the file permissions for each include.php and test.php set to 755. I am not sure what is going on. Anyone have some insight. I have tried looking around for an answer and have only seen file permissions being an aswer for other people which did not work for me.

Thanks for your help.


Check what are the username and groupname of the apache user on your box and set the owner of your php files accordingly. The following command can help you if your config folder is /etc/httpd :

   grep -rn User /etc/httpd/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜