The /application directory is not on the include path, but it shouldn't
need to be as Application.php is trying to include Bootstrap.php with
the full path (i.e.
/Users/Steven/Sites/farstrider.eu/application/Bootstrap.php).
My config file is as follows:
application.xml
----------------
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:zf="http://framework.zend.com/xml/zend-config-xml/1.0/">
<production>
<phpSettings>
<display_startup_errors>0</display_startup_errors>
<display_errors>0</display_errors>
</phpSettings>
<!-- <includePaths>
<app>
<zf:const zf:name="APPLICATION_PATH" />
</app>
</includePaths> -->
<bootstrap>
<path>
<zf:const zf:name="APPLICATION_PATH" />/Bootstrap.php
</path>
<class>Bootstrap</class>
</bootstrap>
<resources>
<frontController>
<controllerDirectory>
<zf:const zf:name="APPLICATION_PATH" />/controllers
</controllerDirectory>
</frontController>
</resources>
</production>
<dev zf:extends="production">
<phpSettings>
<display_startup_errors>1</display_startup_errors>
<display_errors>1</display_errors>
</phpSettings>
</dev>
</application>
Cheers,
-- Steven
Pádraic Brady wrote:
I can't see from the error message, but is the /application directory
added to the include_path? Shouldn't this be done in index.php before
the Bootstrap class is needed. I'm not sure, but I don't think you can
add this path using the Zend_Application configuration file. It's also
very hard to see how the Bootstrap class and path is made known to
Zend_Application - can you post the config file showing the settings
used for the bootstrap prefix, i.e. bootstrap.path and bootstrap.class
Pádraic Brady
http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative <http://www.openideurope.eu/>
------------------------------------------------------------------------
*From:* Steven Szymczak <[email protected]>
*To:* Ruslan Zavackiy <[email protected]>; [email protected]
*Sent:* Sunday, August 9, 2009 1:01:51 PM
*Subject:* Re: [fw-general] Zend/Application.php failing to open
Bootstrap.php
The full path is correct, and the file/class name is "Bootstrap" with an
upper case "B".
Ruslan Zavackiy wrote:
> Check for Bootstrap.php to be exactly with uppercase, not
bootstrap.php and check full path for this also
>
> Best regards,
> Ruslan zavackiy.
>
> On 2009.9.8, at 02:04, Steven Szymczak <[email protected]
<mailto:[email protected]>> wrote:
>
>> I'm trying to update my site to make use of Zend_Application, and
I've set everything up according to the QuickStart and Zend_Application
docs, but all I get is the following error:
>>
>> "Warning: require_once(
/Users/Steven/Sites/farstrider.eu/application/Bootstrap.php )
[function.require-once]: failed to open stream: No such file or
directory in
/Users/Steven/Sites/farstrider.eu/library/Zend/Application.php on line 290
>>
>> Fatal error: require_once() [function.require]: Failed opening
required ' /Users/Steven/Sites/farstrider.eu/application/Bootstrap.php '
(include_path='/Users/Steven/Sites/farstrider.eu/library:.:/php/includes:/usr/local/php/lib/php')
in /Users/Steven/Sites/farstrider.eu/library/Zend/Application.php on
line 290"
>>
>> Even though Bootstrap.php does indeed exist in the application/
directory, and all permissions are correctly set.
>>
>> I'm using ZF 1.9, and my application/Bootstrap.php and
public/index.php files are as follows:
>>
>> Bootstrap.php
>> -------------
>>
>> <?php
>>
>> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
>> {
>>
>> }
>>
>> index.php
>> ---------
>>
>> <?php
>>
>> // Define path to application directory
>> defined('APPLICATION_PATH') || define('APPLICATION_PATH',
realpath(dirname(__FILE__) .'/../application'));
>>
>> // Define application environment
>> defined('APPLICATION_ENV') || define('APPLICATION_ENV',
(getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
>>
>> // Set include path
>> set_include_path(implode(PATH_SEPARATOR,
array(dirname(dirname(__FILE__)) .'/library', get_include_path(),)));
>>
>> // Zend Application
>> require_once 'Zend/Application.php';
>>
>> // Create application, bootstrap, and run
>> $application = new Zend_Application(APPLICATION_ENV,
APPLICATION_PATH .'/config/application.xml');
>> $application->bootstrap()->run();
>>
>> Any ideas?
>>
>> -- スティーブン
>>
-- スティーブン
--
スティーブン