adamsargant Posted August 15, 2008 Share Posted August 15, 2008 I've placed the Zend library folder at /usr/lib/php and set my include path (actually, I've tried both in the php.ini file and with the set_include_path() command) /usr/lib/php/Zend/Loader.php is definitely present, but running the following echo get_include_path()."<br />"; set_include_path(".:/usr/lib/php/library"); echo get_include_path()."<br />"; require_once 'Zend/Loader.php'; gives me .:/usr/share/pear:/usr/share/php .:/usr/lib/php/library Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /home/default/intelligent-income.com/user/htdocs/testinclude.php on line 15 Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/usr/lib/php/library') in /home/default/intelligent-income.com/user/htdocs/testinclude.php on line 15 I'm wracking my late night brains with this one? any help would be greatly appreciated. Adam Quote Link to comment Share on other sites More sharing options...
btherl Posted August 15, 2008 Share Posted August 15, 2008 You said that /usr/lib/php/Zend/Loader.php is present, but you are adding /usr/lib/php/library to your include path. Quote Link to comment Share on other sites More sharing options...
adamsargant Posted August 15, 2008 Author Share Posted August 15, 2008 Sorry, that should have read /usr/lib/php/library/Zend/Loader.php Quote Link to comment Share on other sites More sharing options...
btherl Posted August 15, 2008 Share Posted August 15, 2008 Did you use /usr/lib/php/library/Zend/Loader.php when you checked to see if the file was there? I just want to rule out the simple explanations first If the file really is there, the next thing I would try is putting a file directly in /usr/lib/php/library and including that. Next step would be adding the new include path onto the existing include path instead of replacing it altogether. Maybe that will help for some reason. Quote Link to comment Share on other sites More sharing options...
adamsargant Posted August 15, 2008 Author Share Posted August 15, 2008 Did you use /usr/lib/php/library/Zend/Loader.php when you checked to see if the file was there? I just want to rule out the simple explanations first Absolutely... first check its all plugged in I do appreciate the time I did indeed check that the file Loader.php was present in the /usr/lib/php/library/Zend directory If the file really is there, the next thing I would try is putting a file directly in /usr/lib/php/library and including that. OK, I created a file testincludepath.php and placed it in the library folder Now when I run echo get_include_path()."<br />"; set_include_path(".:/usr/lib/php/library"); echo get_include_path()."<br />"; require_once 'testincludepath.php'; I get .:/usr/share/pear:/usr/share/php .:/usr/lib/php/library Warning: require_once(testincludepath.php) [function.require-once]: failed to open stream: No such file or directory in /home/default/intelligent-income.com/user/htdocs/testinclude.php on line 15 Fatal error: require_once() [function.require]: Failed opening required 'testincludepath.php' (include_path='.:/usr/lib/php/library') in /home/default/intelligent-income.com/user/htdocs/testinclude.php on line 15 which is consistent with my previous experience Next step would be adding the new include path onto the existing include path instead of replacing it altogether. Maybe that will help for some reason. The existing include path seems to be a php default as the path in php.ini is commented out, however, setting the path there rather than with set_include_path() gives exactly the same error as above... the path is clearly set when I echo get_include_path(), but it ain't working... arrghh Quote Link to comment Share on other sites More sharing options...
adamsargant Posted August 15, 2008 Author Share Posted August 15, 2008 OK replying to self, but got to the bottom of the problem When a domain is set up on my server, the vhost.conf file entry includes the line php_admin_value open_basedir /tmp:/home/default/mynewdomain.com limiting the files that can be opened to those in /tmp and above domain root Spotted when I looked at phpinfo.php... commenting the line out solves the problem, though <ponders> wonder if would be better sticking path in php_admin_value open_basedir? </ponder> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.