Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So the same code works on my Ubuntu server but when I upload it to my dedicated hosting server running CentOS it seems to add an extra prefix of .:/usr/share/pear:/usr/share/php: I tried setting includepath to different things but it just doesn't work. The file is in a directory called language in the same folder as the file that is including it and I'm using:

include dirname(__FILE__).DIRECTORY_SEPARATOR."language".DIRECTORY_SEPARATOR."";
include dirname(__FILE__)."/language/language.php";
include "language/language.php";

and a lot of other combinations but I can't get it to find the file. I keep receiving the error message:

Fatal error: require_once() [function.require]: Failed opening required '/home/neo/public_html/migration/include/class/core/' (include_path='.:/usr/share/pear:/usr/share/php:/home/neo/public_html/migration') in /home/neo/public_html/migration/include/class/core/ on line 153
share|improve this question
Something else is wrong here. The extra include paths aren't causing this, because the include path is not used when you specific an absolute path to include, as you do now. – Bart van Heukelom Oct 15 '10 at 21:52

Whenever I have something bizarrely not working on CentOS, the first thing to check is selinux. It's a security system on by default, and it stops programs accessing files anywhere they haven't been given explicit permissions.

You can either look in

/var/log/secure or maybe /var/log/audit/audit.log

for deny messages, or you can test by turning selinux off temporarily with

echo 0 >/selinux/enforce

then testing - but turn it back on later with

echo 1 >/selinux/enforce

and work out how to adjust it to let it work properly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.