> > been found during autoloading unless you had '.' on your include path.
> > Is it possible that changed?
>
> it may be, I will check.
Ok I tried again, it behaves different.
With ZF 1.6.2 I made my IndexController extends BaseAction, and
BaseAction.php is located in the same directory as IndexController
(application/modules/default/controllers directory).
I REMOVED the '.' from the include path.
It works correctly.
Here is my include path grabbed by an echo (the very last path element is
set by php.ini):
G:\Sviluppo\htdocs/application;G:\Sviluppo\htdocs/application/config;G:\Sviluppo\htdocs/application/modules/default/models;G:\Sviluppo\htdocs/application/modules/default/views/helpers;G:\Sviluppo\htdocs/application/modules/admin/models;G:\Sviluppo\htdocs/application/modules/admin/views/helpers;G:\Sviluppo\htdocs/library;G:\Sviluppo\htdocs/library/Pager;G:\Sviluppo\htdocs/public;F:\Sviluppo\php\PHPUnit-3.2.9
Next with ZF 1.7.1 same conditions, it does not work.
( ! ) Warning: include_once(BaseAction.php) [function.include-once]: failed
to open stream: No such file or directory in
G:\Sviluppo\htdocs\library\Zend\Loader.php on line 83
Call Stack
# Time Memory Function Location
1 0.0018 49304 {main}( ) ..\index.php:0
2 0.0039 89472 require( 'G:\Sviluppo\htdocs\application\bootstrap.php' )
..\index.php:2
3 0.9196 3737592 Zend_Controller_Front->dispatch( ) ..\bootstrap.php:187
4 1.1048 4664608 Zend_Controller_Dispatcher_Standard->dispatch( )
..\Front.php:934
5 1.1064 4667064 Zend_Controller_Dispatcher_Standard->loadClass( )
..\Standard.php:255
6 1.1078 4677264 include_once(
'G:\Sviluppo\htdocs\application\modules\default\controllers\IndexController.php'
) ..\Standard.php:334
7 1.1078 4677336 Zend_Loader::autoload( ) ..\Loader.php:0
8 1.1078 4677336 Zend_Loader::loadClass( ) ..\Loader.php:186
( ! ) Warning: include_once() [function.include]: Failed opening
'BaseAction.php' for
inclusion
(include_path='G:\Sviluppo\htdocs/application;G:\Sviluppo\htdocs/application/config;G:\Sviluppo\htdocs/application/modules/default/models;G:\Sviluppo\htdocs/application/modules/default/views/helpers;G:\Sviluppo\htdocs/application/modules/admin/models;G:\Sviluppo\htdocs/application/modules/admin/views/helpers;G:\Sviluppo\htdocs/library;G:\Sviluppo\htdocs/library/Pager;G:\Sviluppo\htdocs/public;F:\Sviluppo\php\PHPUnit-3.2.9')
in G:\Sviluppo\htdocs\library\Zend\Loader.php on line 83
Notice, I'm using PHP 5.2.8.
(Get the same behaviour with php 5.2.6 anyway)
--
View this message in context: http://www.nabble.com/Action-Controllers-extending-custom-one-and-include-path-in-version-1.7.1-tp21021017p21039225.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论