Zend Framework

Error message incorrect.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.10.8
  • Fix Version/s: None
  • Component/s: Zend_Controller
  • Labels:
    None

Description

When Exception occured in init() of IndexController.php(Zend_Controller_Action)
PHP output error message 'Invalid controller specified (error)'
specified controller is correct.
I spend a lot of time to find cauce.
Please change error message.

Activity

Hide
netroby added a comment -

Would you please paste your source code ,see how is the things occured.

Show
netroby added a comment - Would you please paste your source code ,see how is the things occured.
Hide
Yutaka Nakadouzono added a comment -

Hi netroby.

In init()

$config = new Zend_Config_Ini(APP_DIR.'/config.ini', 'hogehoge_db');

If there is not config.ini file, Exception occured.
'Invalid controller specified (error)'

Thank you.

Show
Yutaka Nakadouzono added a comment - Hi netroby. In init() $config = new Zend_Config_Ini(APP_DIR.'/config.ini', 'hogehoge_db'); If there is not config.ini file, Exception occured. 'Invalid controller specified (error)' Thank you.
Hide
Konr Ness added a comment -

Does your project have an Error controller? When an exception occurs in a controller, whether in init() or an action, this causes the Error controller to be dispatched.

Show
Konr Ness added a comment - Does your project have an Error controller? When an exception occurs in a controller, whether in init() or an action, this causes the Error controller to be dispatched.
Hide
Marc Hodgins added a comment - - edited

Cannot reproduce with ZF 1.11, please reopen if you can provide a full test case. If you require support please use the mailing list or IRC.

Using your example code:

class IndexController extends Zend_Controller_Action
{
    public function init() {
        define('APP_DIR', 'foo');
        $config = new Zend_Config_Ini(APP_DIR.'/config.ini', 'hogehoge_db');
        // passes to error controller, shows 
        // "parse_ini_file(foo/config.ini): 
        // failed to open stream: No such file or directory"
    }
}
Show
Marc Hodgins added a comment - - edited Cannot reproduce with ZF 1.11, please reopen if you can provide a full test case. If you require support please use the mailing list or IRC. Using your example code:
class IndexController extends Zend_Controller_Action
{
    public function init() {
        define('APP_DIR', 'foo');
        $config = new Zend_Config_Ini(APP_DIR.'/config.ini', 'hogehoge_db');
        // passes to error controller, shows 
        // "parse_ini_file(foo/config.ini): 
        // failed to open stream: No such file or directory"
    }
}

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: