History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-835
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Not an Issue
Priority: Minor Minor
Assignee: Matthew Weier O'Phinney
Reporter: Jason Qi
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

get error when input index.php in url instead of input nothing or index

Created: 31/Jan/07 02:35 PM   Updated: 05/Jul/07 02:43 PM
Component/s: Zend_Controller
Affects Version/s: 0.7.0
Fix Version/s: None

Time Tracking:
Not Specified

Tags:
Participants: Jason Qi and Matthew Weier O'Phinney


 Description  « Hide


Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (index.php)' in c:\zf-tutorial\library\Zend\Controller\Dispatcher.php:159 Stack trace: #0 c:\zf-tutorial\library\Zend\Controller\Front.php(726): Zend_Controller_Dispatcher->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 c:\zf-tutorial\index.php(55): Zend_Controller_Front->dispatch() #2 {main} thrown in c:\zf-tutorial\library\Zend\Controller\Dispatcher.php on line 159

 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Jason Qi - 31/Jan/07 03:17 PM

I could solve this problem by add

// Remove the .php from REQUEST_URI
if ($pos = strpos($requestUri, '.')) { $requestUri = substr($requestUri, 0, $pos); }

after line 531

in \library\Zend\Controller\Request\Http.php

But I don't have a big picture, does anybody have a better solution or consider this is not a issue?


Matthew Weier O'Phinney - 13/Feb/07 10:31 AM
Not an issue, really. The ZF MVC is expecting pretty URLs – i.e., no 'index.php' in the URL. If you need it there, and it will be present in all paths in the site, use setBaseUrl() to add it to the request's matching mechanisms.