file not found error - 1.03

11 messages Options
Embed this post
Permalink
Xavier Vidal

file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
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.

Here is the stack trace dump:

File "IndexController.php" was not found

Array
(
[0] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Zend\Loader.php
[line] => 91
[function] => loadFile
[class] => Zend_Loader
[type] => ::
[args] => Array
(
[0] => IndexController.php
[1] => Array
(
)

[2] => 1
)

)

[1] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Prototype\Kernel\Bootstrap.php
[line] => 17
[function] => loadClass
[class] => Zend_Loader
[type] => ::
[args] => Array
(
[0] => IndexController
)

)

[2] => Array
(
[function] => __autoload
[args] => Array
(
[0] => IndexController
)

)

[3] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Zend\Controller\Dispatcher\Standard.php
[line] => 165
[function] => class_exists
[args] => Array
(
[0] => IndexController
)

)

[4] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Zend\Controller\Dispatcher\Standard.php
[line] => 194
[function] => isDispatchable
[class] => Zend_Controller_Dispatcher_Standard
[type] => ->
[args] => Array
(
[0] => Zend_Controller_Request_Http Object
(
[_requestUri:protected] => /
[_baseUrl:protected] =>
[_basePath:protected] =>
[_pathInfo:protected] => /
[_params:protected] => Array
(
[controller] => index
[action] => index
[module] => default
)

[_aliases:protected] => Array
(
)

[_dispatched:protected] => 1
[_module:protected] => default
[_moduleKey:protected] => module
[_controller:protected] => index
[_controllerKey:protected] => controller
[_action:protected] => index
[_actionKey:protected] => action
)

)

)

[5] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Zend\Controller\Front.php
[line] => 929
[function] => dispatch
[class] => Zend_Controller_Dispatcher_Standard
[type] => ->
[args] => Array
(
[0] => Zend_Controller_Request_Http Object
(
[_requestUri:protected] => /
[_baseUrl:protected] =>
[_basePath:protected] =>
[_pathInfo:protected] => /
[_params:protected] => Array
(
[controller] => index
[action] => index
[module] => default
)

[_aliases:protected] => Array
(
)

[_dispatched:protected] => 1
[_module:protected] => default
[_moduleKey:protected] => module
[_controller:protected] => index
[_controllerKey:protected] => controller
[_action:protected] => index
[_actionKey:protected] => action
)

[1] => Zend_Controller_Response_Http Object
(
[_body:protected] => Array
(
)

[_exceptions:protected] => Array
(
)

[_headers:protected] => Array
(
)

[_headersRaw:protected] => Array
(
)

[_httpResponseCode:protected] => 200
[_isRedirect:protected] =>
[_renderExceptions:protected] =>
[headersSentThrowsException] => 1
)

)

)

[6] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Zend\Controller\Front.php
[line] => 233
[function] => dispatch
[class] => Zend_Controller_Front
[type] => ->
[args] => Array
(
)

)

[7] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\lib\Prototype\Kernel\Bootstrap.php
[line] => 222
[function] => run
[class] => Zend_Controller_Front
[type] => ::
[args] => Array
(
[0] => Array
(
[admin] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\usr/admin/controllers
[default] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\usr/default/controllers
)

)

)

[8] => Array
(
[file] => C:\Documents and Settings\xvidal\Mis documentos\xaviervidal.net\www\index.php
[line] => 35
[function] => run
[class] => Prototype_Kernel_Bootstrap
[type] => ->
[args] => Array
(
)

)

)


--
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[hidden email]
[hidden email]
http://web.xaviervidal.net
610.68.41.78
weierophinney

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
-- Xavier Vidal Piera <[hidden email]> 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            | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Ralf Eggert

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
In reply to this post by Xavier Vidal
Hi,

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
Ralf Eggert

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
Hi 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
Ralf Eggert

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
Hi, 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
digitalus_media

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
In reply to this post by weierophinney
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();
jwhitcraft

RE: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
Why 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:[hidden email]]
Sent: Sat 12/1/2007 10:28 AM
To: [hidden email]
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.
********************
********************
digitalus_media

RE: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
i never knew they added that in.  that resolved my issue.
Ralf Eggert

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
In reply to this post by jwhitcraft
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

jwhitcraft

RE: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
I'm glad my limited knowledge of ZF could help people
 
Cheers
 
Jon

________________________________

From: Ralf Eggert [mailto:[hidden email]]
Sent: Sun 12/2/2007 3:42 AM
To: [hidden email]
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.
********************
********************
Duong Luu

Re: file not found error - 1.03

Reply Threaded More More options
Print post
Permalink
In reply to this post by Ralf Eggert
hi there,

same problem, same fix applied and everything works fine again.

regards,
duong