Matthew Weier O'Phinney-3 wrote:
> 
> Zend_Tool generates a public/index.php file, an
> application/Bootstrap.php file, and an
> application/configs/application.ini file. public/index.php pulls in
> Zend_Application, and passes it the path to the configuration file,
> which indicates the include paths and path to the bootstrap class file.
> 

Forgive me if I'm missing something obvious here but if I set up my
index.php and application.ini exactly how it specifies in the manual, I'll
get a fatal error as the Zend/Application.php file cannot be located due to
the path to the Zend library being added to the include_path by
Zend_Application. I've always set the include_path to the Zend library
(which always resides in my project/library directory) in my index.php like
so:

-----------------------------------------------------------------------------------------------------
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
define('LIBRARY_PATH',     realpath(APPLICATION_PATH  . '/../library'));

defined('APPLICATION_ENV')
    || define('APPLICATION_ENV',
        (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') :
'production'));

set_include_path(implode(PATH_SEPARATOR, array(
    LIBRARY_PATH,
    get_include_path()
)));

require_once 'Zend/Application.php';

$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap();
$application->run();
-----------------------------------------------------------------------------------------------------

Is the set_include_path call above somehow redunant like it suggests in the
manual? My include_path setting in php.ini is just ".". Using Zend_Tool to
create a project skeleton might answer my question but, as Rob Allen posted,
it's failing in 1.8.0b1 so I can't test it.

Many thanks!
-- 
View this message in context: 
http://www.nabble.com/Zend_Application-Bootstrapping-tp23145548p23197441.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to