1

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."storage.inc";
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/storage.inc' (include_path='.:/usr/share/pear:/usr/share/php:/home/neo/public_html/migration') in /home/neo/public_html/migration/include/class/core/class_lang.inc on line 153
1
  • 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. Oct 15, 2010 at 21:52

1 Answer 1

2

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.

You must log in to answer this question.

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