-1

I'm working on setting up PHP 5.4, and I've set a library up in /usr/share/php/ I've set include_path='.:/usr/share/php', and was not able to include anything with a relative require_once.

I've set the include up to the explicit path, and get a permission error, even after chmoding the file to 777.

failed to open stream: Permission denied

Is there something I'm missing?

EDIT

Here are the permissions for the file I'm trying to include:

/usr/share/php
drwxrwxrwx. 64 1001 1001 4096 Sep 29  2011 Zend

/usr/share/php/Zend/
-rwsrwsrwt.  1 1001 1001  12959 Mar  1  2011 Config.php

And the two require lines I tried:

require_once('/usr/share/php/Zend/Config.php');
require_once('Zend/Config.php');
2
  • What distribution? SELinux/AppArmor?
    – Kyle Smith
    Apr 3, 2012 at 16:52
  • @Kyle Smith CentOS 6.0. No AppArmor or SELinux Apr 3, 2012 at 17:04

1 Answer 1

1

check if you have execution permission on the folder your lib is sitting in you need to enable apache(or whatever web server you are using) with execution permission on the folder containing the files you want to include/require

2
  • Chmodded the folder as well, and still get the same error. Apr 3, 2012 at 16:46
  • could you paste the output of ls -la command that shows permissions on the lib you want to include and the folder containing it and also the lines of php code you are using for the require once ?
    – m0ntassar
    Apr 3, 2012 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .