I'm currently reading the "Easy PHP Websites with the Zend Framework". At some point, it introduces Doctrine and gives a src code along with an text on how to install stuff properly. I've followed all the steps correctly, but in one you have to use a "seed.php" which reads some ASINs and loads some amazon product details into the databass. However, executing the script gives me errors, and it seems like it can't locate a file.
PHP Warning: include_once(WJG\Controller\Action\Helper\Initializer.php): failed to open stream: No such file or directory in C:\Programming\zend\library\Zend\L oader.php on line 134 PHP Stack trace: PHP
1. {main}() C:\wamp\www\webclass\application\scripts\seed.php:0 PHP
2. include() C:\wamp\www\webclass\application\scripts\seed.php:9 PHP
3. Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() C:\Programmin g\zend\library\Zend\Application.php:355 PHP
5. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() C:\Programmi ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586 PHP
6.Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() C:\Pro gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622 PHP
7. Bootstrap->_initGlobalVars() C:\Programming\zend\library\Zend\Applicati on\Bootstrap\BootstrapAbstract.php:669 PHP
8.Zend_Loader_Autoloader::autoload() C:\Programming\zend\library\Zend\App lication\Bootstrap\BootstrapAbstract.php:0 PHP
9. call_user_func() C:\Programming\zend\library\Zend\Loader\Autoloader.php :124 PHP
10.Zend_Loader_Autoloader->_autoload() C:\Programming\zend\library\Zend\Lo ader\Autoloader.php:124 PHP
11. call_user_func() C:\Programming\zend\library\Zend\Loader\Autoloader.php :479 PHP
12. Zend_Loader::loadClass() C:\Programming\zend\library\Zend\Loader\Autolo ader.php:479 PHP
13. Zend_Loader::loadFile() C:\Programming\zend\library\Zend\Loader.php:82Warning: include_once(WJG\Controller\Action\Helper\Initializer.php): failed to o pen stream: No such file or directory in C:\Programming\zend\library\Zend\Loader .php on line 134
Call Stack: 0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0 0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam p\www\webclass\application\scripts\seed.php:9 0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20 0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap() C:\Programming\zend\library\Zend\Application.php:355 0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p hp:586 0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst ract.php:622 0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669 0.0190 3236432 8. Zend_Loader_Autoloader::autoload() C:\Programming\zen d\library\Zend\Application\Bootstrap\BootstrapAbstract.php:0 0.0191 3236768 9. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:124 0.0191 3236800 10. Zend_Loader_Autoloader->_autoload() C:\Programming\ze nd\library\Zend\Loader\Autoloader.php:124 0.0191 3236848 11. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:479 0.0191 3236880 12. Zend_Loader::loadClass() C:\Programming\zend\library\ Zend\Loader\Autoloader.php:479 0.0191 3237136 13. Zend_Loader::loadFile() C:\Programming\zend\library\Z end\Loader.php:82
PHP Warning: include_once(): Failed opening 'WJG\Controller\Action\Helper\Initi alizer.php' for inclusion (include_path='C:\wamp\www\webclass\application/../vie ws;.;C:\wamp\bin\php\php5.3.13\pear;c:\php\includes;C:\Programming\zend\library; C:\wamp\bin\php\php5.3.13\pear\PEAR') in C:\Programming\zend\library\Zend\Loader .php on line 134 PHP Stack trace: PHP 1. {main}() C:\wamp\www\webclass\application\scripts\seed.php:0 PHP 2. include() C:\wamp\www\webclass\application\scripts\seed.php:9 PHP 3. Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20 PHP 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() C:\Programmin g\zend\library\Zend\Application.php:355 PHP 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() C:\Programmi ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586 PHP 6. Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() C:\Pro gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622 PHP 7. Bootstrap->_initGlobalVars() C:\Programming\zend\library\Zend\Applicati on\Bootstrap\BootstrapAbstract.php:669 PHP 8. Zend_Loader_Autoloader::autoload() C:\Programming\zend\library\Zend\App lication\Bootstrap\BootstrapAbstract.php:0 PHP 9. call_user_func() C:\Programming\zend\library\Zend\Loader\Autoloader.php :124 PHP 10. Zend_Loader_Autoloader->_autoload() C:\Programming\zend\library\Zend\Lo ader\Autoloader.php:124 PHP 11. call_user_func() C:\Programming\zend\library\Zend\Loader\Autoloader.php :479 PHP 12. Zend_Loader::loadClass() C:\Programming\zend\library\Zend\Loader\Autolo ader.php:479 PHP 13. Zend_Loader::loadFile() C:\Programming\zend\library\Zend\Loader.php:82
Warning: include_once(): Failed opening 'WJG\Controller\Action\Helper\Initialize r.php' for inclusion (include_path='C:\wamp\www\webclass\application/../views;.; C:\wamp\bin\php\php5.3.13\pear;c:\php\includes;C:\Programming\zend\library;C:\wa mp\bin\php\php5.3.13\pear\PEAR') in C:\Programming\zend\library\Zend\Loader.php on line 134
Call Stack: 0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0 0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam p\www\webclass\application\scripts\seed.php:9 0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20 0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap() C:\Programming\zend\library\Zend\Application.php:355 0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p hp:586 0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst ract.php:622 0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669 0.0190 3236432 8. Zend_Loader_Autoloader::autoload() C:\Programming\zen d\library\Zend\Application\Bootstrap\BootstrapAbstract.php:0 0.0191 3236768 9. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:124 0.0191 3236800 10. Zend_Loader_Autoloader->_autoload() C:\Programming\ze nd\library\Zend\Loader\Autoloader.php:124 0.0191 3236848 11. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:479 0.0191 3236880 12. Zend_Loader::loadClass() C:\Programming\zend\library\ Zend\Loader\Autoloader.php:479 0.0191 3237136 13. Zend_Loader::loadFile() C:\Programming\zend\library\Z end\Loader.php:82
PHP Fatal error: Class 'WJG_Controller_Action_Helper_Initializer' not found in C:\wamp\www\webclass\application\Bootstrap.php on line 39 PHP Stack trace: PHP 1. {main}() C:\wamp\www\webclass\application\scripts\seed.php:0 PHP 2. include() C:\wamp\www\webclass\application\scripts\seed.php:9 PHP 3. Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20 PHP 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() C:\Programmin g\zend\library\Zend\Application.php:355 PHP 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() C:\Programmi ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586 PHP 6. Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() C:\Pro gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622 PHP 7. Bootstrap->_initGlobalVars() C:\Programming\zend\library\Zend\Applicati on\Bootstrap\BootstrapAbstract.php:669
Fatal error: Class 'WJG_Controller_Action_Helper_Initializer' not found in C:\wa mp\www\webclass\application\Bootstrap.php on line 39
Call Stack: 0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0 0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam p\www\webclass\application\scripts\seed.php:9 0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20 0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap() C:\Programming\zend\library\Zend\Application.php:355 0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p hp:586 0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource() C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst ract.php:622 0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669
This is the error, and here is the _initGlobalVars()
protected function _initGlobalVars()
{
Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH.'/../library/WJG/Controller/Action/Helper');
$initializer = Zend_Controller_Action_HelperBroker::addHelper(
new WJG_Controller_Action_Helper_Initializer());
}
If you want some more info ask me, please help me because I really want to continue with the flow of the book, thanks!
WJG\Controller\Action\Helper\Initializer.php
. Does this file exist? – Tim Fountain