-
- 9 Posts
I have this set in my root/etc/php.ini
include_path = ".:"
Should I remove that?
And what should my index.php look like to fix this?
// set some runtime options
$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
if(version_compare(phpversion(), "4.3.0")>=0) {
set_include_path($incPath); // this now works, above code did not?
} else {
ini_set("include_path", $incPath); // include path the old way
}
Do I need to add an absolute path in there or something? I really need to solve this asap as ModX is the best CMS I have trialed over the past two weeks for my clients, and I am ready to roll out a number of sites with it, if I can just get around this hurdle.
-
- 9 Posts
All FIXED!
I emailed my host support and they sorted it out based on the information in this thread, they changed the following in the php.ini file:
php.ini
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
include_path = ".:./includes:../includes:../../includes"
Works good now. Thanks!
For clarification, the problem is not the php.ini include_path, but more likely a php_admin_value in an Apache httpd.conf file which prevents the set_include_path/ini_set from working. If we changed the name of the directory to something other than includes, this rather unorthodox solution would stop working, and I dare say it’s a bit hackish.
-
- 9 Posts
Well the issue is that information doesnt seem to be readily available...