php include path problem:Same code works on Ubuntu default Apache and php conf, but not on CentOS
Posted
by
Neo
on Server Fault
See other posts from Server Fault
or by Neo
Published on 2010-10-15T21:48:52Z
Indexed on
2010/12/29
14:56 UTC
Read the original article
Hit count: 286
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"; and
include dirname(__FILE__)."/language/language.php";
and
include "language/language.php";
and alot of other combinations but I can't get it to find the file.
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
© Server Fault or respective owner