• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

include_path error

S

StuartS

Guest
Hi,

Can anyone offer some help please.

I get the following error message when I run a php script

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/examsolutions.co.uk/httpdocs/maths-challenges/Demo1.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/usr/local/lib/php/library') in /var/www/vhosts/examsolutions.co.uk/httpdocs/maths-challenges/Demo1.php on line 2

I have checked my php.ini file and the include path is set to

include_path='.:/usr/local/lib/php/library'

The folders and scripts are in the correct location but I still get the error message.


Does anyone know how to correct this?

Your help would be greatly appreciated.
Thanks.
 
1. Zend/Loader.php, is this the correct path relative to the Demo1.php?
2. Since you're on Linux, make sure that the file names are case sensitive.
3. Check file/folder permissions and ownership

I don't think php.ini would be the issue since you're talking about a filesystem related error. There is also the open_basedir, which may need to be enabled on this site: http://kb.odin.com/en/432
 
I'm working also on getting ZendFramework to work serverwide with plesk, and I'm getting also the error, require_once or require seems to not work.

Regarding to path, is not really a must, if you edit your php.ini file, and add to the include_path :/PATH/TO/ZF/library, you should be able to use it.

I have 2 test servers (CentOS 5 and Fedora 9) both standard instalation, its not a cloned plesk enviroment, and with just the include_path thingy the ZendFramework works flawlessly. i have tested several modules, and they all work, now, when I try on any Plesk server, well no-way-jose, it just doesnt work.

I have tried modifying the vhost.conf for open_basedir, php_admin_flag, php_value (http://www.php.net/manual/en/configuration.changes.php) and on http://kb.odin.com/en/432 with no luck at all. in fact, i am not even able to use ../private as a place to store files i dont want to have public.

so I'm a bit lost here. I will look onto this also for the next weeks, I really want ZF installed, up and runing on my servers and on those I manage for customers.
 
Ok i found a way to allow ZendFramework (in my case) to work.

The problem is related to php_safe_mode.

in php.ini

safe_mode_include_dir = /usr/share/ZendFramework/library

it worked for me, now, is it secure? no clue, i will keep working on test security and will get back with new means if any.
 
I will be testing if the php_admin_flag works with this command, if so, we then will be able to enable custom frameworks on a per domain basis with vhost.conf.
 
Back
Top