2
votes

I installed the Zend Framework, but I have a big problem here. When I entered on the public folder of my application (localhost/webserver/project/public/), I had that error:

An error occurred

Page not found

Exception information:

Message: Invalid controller specified (public)

Stack trace:

0 C:\webserver\project\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))

1 C:\webserver\project\library\Zend\Application\Bootstrap\Bootstrap.php(97): >end_Controller_Front->dispatch()

2 C:\webserver\project\library\Zend\Application.php(366): >Zend_Application_Bootstrap_Bootstrap->run()

3 C:\webserver\project\public\index.php(40): Zend_Application->run()

4 {main}

Request Parameters:

array (

'controller' => 'public',

'action' => 'index',

'module' => 'default',

)

My public folder is interpreted like a controller. I'm running the application in Apache2.2 and PHP5.3 with the Xampp.

My Document_Root set on the htdoc is "C:/webserver", because I use other application on the same server. I'm using the Rewrite Rules in my htaccess on the public folder.

SetEnv APPLICATION_ENV development

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

How can I make that work?

2

2 Answers

2
votes

Open your application.ini and add

resources.frontController.baseurl = "webserver/project/public"
0
votes

you can try creating virtual hosts for your projects. A better explanation is in: ZEND FRAMEWORK and virtual host in apache. Sorry about the english