I get the following error when I try to run the project created by Zend Framework. Its looking for Zend/Application.php and that is available in the directory that is in my include_path. I do have read permissions on the directory.
PHP Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php' (include_path='/var/www/vhosts/moderncloud.net/om/library:.:/var/www/vhosts/moderncloud.net/om /library:') in /var/www/vhosts/moderncloud.net/om/public/index.php on line 24
<?php
// Define path to application directory
//defined('APPLICATION_PATH')
// || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', dirname(__FILE__) . '/../application');
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
('/var/www/vhosts/moderncloud.net/om/library'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
SOLUTION:
I found it myself today. Its a problem with the option "php_admin_value open_basedir" in my httpd configuration. I set it to none and it started working. Alternatively, I guess I can append the Zend library directory to the open_basedir option in my web server configuration instead of setting it to none.
/var/www/vhosts/moderncloud.net/om/library/Zend/Application.php
? – Tim Fountain Nov 19 '11 at 16:01