I am using Ubuntu 14.04. i have done a project using codeigniter and that was working fine. but now i thought of learning zend framework and installed zend framework 1.12.3 on my machine using this tutorial Digital Ocean.
When i tried to access the new project i have created http://localhost/ZendApp i get this error
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (ZendApp)
Stack trace:
#0 /home/ZendFramework-1.12.3/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /home/ZendFramework-1.12.3/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /home/ZendFramework-1.12.3/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/html/ZendApp/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => 'ZendApp',
'action' => 'index',
'module' => 'default',
)
And When i try to access my old project, i have done using codeigniter also i get the same error.
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (lankahomes)
Stack trace:
#0 /home/ZendFramework-1.12.3/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /home/ZendFramework-1.12.3/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /home/ZendFramework-1.12.3/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/html/ZendApp/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => 'lankahomes',
'action' => 'index',
'module' => 'default',
)
can someone help me to fix this problem. Tnx
It's about your apache configuration ( i assume you use apache cause it's in digital ocean documentation )
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/ZendApp/public
with this configuration, your localhost domain is only working for your zend project. Change it's ServerName to another domain and add it to your /etc/hosts file like
/etc/apache2/sites-enabled/000-default
<VirtualHost *:80>
ServerName zendproject.dev
DocumentRoot /var/www/ZendApp/public
/etc/hosts
127.0.0.1 zendproject.dev
And restart your apache server. Then you can use zendproject.dev domain for your zend app and localhost for your default localhost directory. ( and i assume you have another apache vhosts conf file for localhost )