2
votes

I have a simple ZF that already works well. I've set it up to work in a subfolder, so I access it with localhost/zftutorial URL.

Now the time came for debugging, but when I execute debugger in Eclipse, it appends debug URL params (like XDEBUG_SESSION_START=ECLIPSE_DBGP) which break everything and I start getting this message:

> Zend_Controller_Dispatcher_Exception: Invalid controller specified (index.php) in C:\Program Files\VertrigoServ\www\library\Zend\library\Zend\Controller\Dispatcher\Standard.php on line 241

I've tried to set both localhost/zftutorial and localhost/zftutorial/public/index.php as start URLs for debugger, but still getting the same message.

Looks like ZF likes clean URL names, but Eclipse wants scripts with php extensions, but controller names. Whichever debug options I use, Ecplise tries to start debugging from not Zend-style URL - http://localhost/zftutorial/index.php

I guess this can be solved 2 ways:

  • configuring Eclipse somehow to use a proper URL with debug params, like localhost/zftutorial
  • setting rewrite rule for localhost/zftutorial/public/index.php to be rewritten as localhost/zftutorial (right?)
1

1 Answers

1
votes

I've come to a conclusion that such problems are best avoidable by setting up ZF application public folder as root folder in web server. Such root placement is a recommended practice and causes are no debug-related problems like above, unlike when ZF app resides in a subfolder and mod_rewrite rules break things now and then.