|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
file not found error - 1.03I've installed the new Zend Framework version (1.03) and suddenly i've have a "File 'BlaBlaBlaController.php' not found":
My setup it always worked with previous versions. I'm using Zend_Layout and Zend_View_Enhanced from incubator, but i don't know if this error has something related with them. Here is the stack trace dump: File "IndexController.php" was not found -- Xavier Vidal Piera Enginyer Tècnic Informàtic de Gestió Tècnic Especialista Informàtic d'equips xavividal@... xvidal@... http://web.xaviervidal.net 610.68.41.78 |
|
|
Re: file not found error - 1.03-- Xavier Vidal Piera <xavividal@...> wrote
(on Friday, 30 November 2007, 04:28 PM +0100): > I've installed the new Zend Framework version (1.03) and suddenly i've have a > "File 'BlaBlaBlaController.php' not found": > > My setup it always worked with previous versions. I'm using Zend_Layout and > Zend_View_Enhanced from incubator, but i don't know if this error has something > related with them. Shouldn't; neither hooks into routing or the dispatcher. > Here is the stack trace dump: > > > File "IndexController.php" was not found Wait -- you said earlier that it was BlaBlaBlaController.php, now you say IndexController.php... or was 'BlaBlaBla' just a placeholder? What I'm seeing from your stack trace is that Zend_Loader is not finding IndexController.php -- and that there are no directories being passed to Zend_Loader::loadFile(). This tells me that you're not setting the path to the controller directory(ies) in your bootstrap, or that they're not resolving correctly (which may be an OS-specific issue). Caveat: there were some performance enhancements to Zend_Loader and Zend_Controller_Dispatcher_Standard in this release. However, they were all tested, and I can verify that I'm running code in production that uses these changes. Could you send over your bootstrap code for me to look at, and some details on your environment (OS, web server, PHP version)? I suspect the issue is in there somewhere. -- Matthew Weier O'Phinney PHP Developer | matthew@... Zend - The PHP Company | http://www.zend.com/ |
|
|
Re: file not found error - 1.03Hi,
I think I have the same problem after upgrading to 1.0.3 version. My trace looks like this: 'File "BookController.php" was not found' (length=39) #0 E:\_library\Zend\Loader.php(91): Zend_Loader::loadFile('BookController....', Array, true) #1 E:\_application\config.php(40): Zend_Loader::loadClass('BookController') #2 [internal function]: __autoload('BookController') #3 E:\_library\Zend\Controller\Dispatcher\Standard.php(165): class_exists('BookController') #4 E:\_application\Main\Plugin\Notfound.php(28): Zend_Controller_Dispatcher_Standard->isDispatchable(Object(Zend_Controller_Request_Http)) #5 E:\_library\Zend\Controller\Plugin\Broker.php(307): Main_Plugin_Notfound->preDispatch(Object(Zend_Controller_Request_Http)) #6 E:\_library\Zend\Controller\Front.php(916): Zend_Controller_Plugin_Broker->preDispatch(Object(Zend_Controller_Request_Http)) #7 E:\www.travello-dev.com\public\index.php(50): Zend_Controller_Front->dispatch(Object(Zend_Controller_Request_Http), Object(Travello_Controller_Response)) #8 {main} The controller class to be loaded is called Destination_BookController and was loaded properly before I upgraded. It is located in my application directory Destination/Controller/BookController.php and I did not change any other settings. First, I would expect "Destination_BookController" class to be loaded. Second, could this be due to problem with my __autoload function which looks like this: function __autoload($class) { Zend_Loader::loadClass($class); } Do I need to pass a directory to Zend_Loader::loadClass method? Why was this changed? What went wrong here and how can I solve this problem? Thanks and Best Regards, Ralf |
|
|
Re: file not found error - 1.03Hi again,
ok, I noticed a slightly difference between 1.0.2 and 1.0.3 in the Controller class loading, which seems to cause my problems. In 1.0.2 the controller classes were not loaded by using Zend_Loader::loadClass(), in 1.0.3 they are. Any comments are welcome, I will keep on investigating. Best Regards, Ralf |
|
|
Re: file not found error - 1.03Hi, its me again,
I can solve my problem for the moment when I comment out the lines 165-167 and 282-284 in Zend_Controller_Dispatcher_Standard file. I guess the problem lies in my directory structure and the naming of my controller classes. For the module "destination" and the controller "book" the dispatcher expects a controller class called "Destination_BookController". When I use Zend_Loader::loadClass($class) in my __autoload() function I guess I need to locate the "Destination_BookController" class in the file Destination/BookController.php and not in Destination/Controller/BookController.php which worked until 1.0.2. So, when I rename my controller class into "Destination_Controller_Book" and locate it in the Destination/Controller/Book.php then the Zend_Loader::loadClass($class) in my __autoload() function should work, but on the other side the dispatcher stills expects the controller class to be called "Destination_BookController". Is this correct? Any ideas how to solve this without commenting out the lines I mentioned above? Best Regards, Ralf |
|
|
Re: file not found error - 1.03I am having this same issue in a very simple local utility tool.
My Bootstrap: <?php date_default_timezone_set('America/New_York'); set_include_path('.' . PATH_SEPARATOR . get_include_path() . '/ZendFramework-1.0.3' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . '../application/models'); include "Zend/Loader.php"; function __autoload($class) { Zend_Loader::loadClass($class); } //setup session Zend_Session::start(); // load configuration $config = new Zend_Config_Xml('../application/data/config.xml', 'DSF'); //get an instance of the registry $registry = Zend_Registry::getInstance(); //save the config information into the registry $registry->set('config', $config); $registry->set('post',$_POST); // setup controller $frontController = Zend_Controller_Front::getInstance(); $frontController->throwExceptions(true); $frontController->setControllerDirectory('../application/controllers'); // run! $frontController->dispatch(); |
|
|
RE: file not found error - 1.03Why do you define the __autoload function when you can just call this in the loader
require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); From my reading that is the proper way to do it in ZF. Jon Whitcraft Indianapolis Motor Speedway ________________________________ From: digitalus_media [mailto:me@...] Sent: Sat 12/1/2007 10:28 AM To: fw-mvc@... Subject: Re: [fw-mvc] file not found error - 1.03 I am having this same issue in a very simple local utility tool. My Bootstrap: <?php date_default_timezone_set('America/New_York'); set_include_path('.' . PATH_SEPARATOR . get_include_path() . '/ZendFramework-1.0.3' . PATH_SEPARATOR . '../library' . PATH_SEPARATOR . '../application/models'); include "Zend/Loader.php"; function __autoload($class) { Zend_Loader::loadClass($class); } //setup session Zend_Session::start(); // load configuration $config = new Zend_Config_Xml('../application/data/config.xml', 'DSF'); //get an instance of the registry $registry = Zend_Registry::getInstance(); //save the config information into the registry $registry->set('config', $config); $registry->set('post',$_POST); // setup controller $frontController = Zend_Controller_Front::getInstance(); $frontController->throwExceptions(true); $frontController->setControllerDirectory('../application/controllers'); // run! $frontController->dispatch(); -- View this message in context: http://www.nabble.com/file-not-found-error---1.03-tf4924086s16154.html#a14106328 Sent from the Zend MVC mailing list archive at Nabble.com. ******************** ******************** This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted. ******************** ******************** |
|
|
RE: file not found error - 1.03i never knew they added that in. that resolved my issue.
|
|
|
Re: file not found error - 1.03Hi Jon,
> require_once 'Zend/Loader.php'; > Zend_Loader::registerAutoload(); Thanks! That solves all my problems without the need to comment out anything. Nice one! Best Regards, Ralf |
|
|
RE: file not found error - 1.03I'm glad my limited knowledge of ZF could help people
Cheers Jon ________________________________ From: Ralf Eggert [mailto:r.eggert@...] Sent: Sun 12/2/2007 3:42 AM To: fw-mvc@... Subject: Re: [fw-mvc] file not found error - 1.03 Hi Jon, > require_once 'Zend/Loader.php'; > Zend_Loader::registerAutoload(); Thanks! That solves all my problems without the need to comment out anything. Nice one! Best Regards, Ralf ******************** ******************** This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted. ******************** ******************** |
|
|
Re: file not found error - 1.03hi there,
same problem, same fix applied and everything works fine again. regards, duong |
| Free embeddable forum powered by Nabble | Forum Help |