views:

146

answers:

4

Hi to all Expert, Please help me, i m newbie to zend framework. I installed zend framework on ubuntu machine but when i goes for "http://zf.local/Users/index" it works fine but when i enter into address bar "http://zf.local/Users/Login" it shows me following error:

An error occurred
Application error
Exception information:
Message: script 'users/login.phtml' not found in path (/var/www/zf/application/views/scripts/)
Stack trace:
#0 /var/www/zf/library/Zend/View/Abstract.php(876): Zend_View_Abstract->_script('users/login.pht...')
#1 /var/www/zf/library/Zend/Controller/Action/Helper/ViewRenderer.php(897): Zend_View_Abstract->render('users/login.pht...')
#2 /var/www/zf/library/Zend/Controller/Action/Helper/ViewRenderer.php(918): Zend_Controller_Action_Helper_ViewRenderer->renderScript('users/login.pht...', NULL)
#3 /var/www/zf/library/Zend/Controller/Action/Helper/ViewRenderer.php(957): Zend_Controller_Action_Helper_ViewRenderer->render()
#4 /var/www/zf/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#5 /var/www/zf/library/Zend/Controller/Action.php(523): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#6 /var/www/zf/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('loginAction')
#7 /var/www/zf/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#8 /var/www/zf/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#9 /var/www/zf/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#10 /var/www/zf/public/index.php(27): Zend_Application->run()
#11 {main}  
Request Parameters:
array (
  'controller' => 'Users',
  'action' => 'Login',
  'module' => 'default',
)  

views file for login.phtml is alredy created using zf_tool. Please help me.

A: 

i'll assume that you had verified the file location, the action call etc.

Try checking the access privileges for the login.phtml file.

Hanseh
A: 

It is definitely an issue that file does not exist. Try to cat in console a path /var/www/zf/application/views/scripts/users/login.phtml.

If it really exists check its permissions.

hsz
A: 

As others have suggested, double check the file location and permissions. Check also the case of the filename, as you've named the action 'Login' with a capital L, but ZF is looking for 'login.phtml' (lower case L). So if you've called it Login.phtml it will need renaming.

Tim Fountain
A: 

Hi !

Its just a case sensitive problem .............

I know sounds wired but that the truth in linux machine & ZF you should take care about your case sensitivity check this out :

 Message: script 'users/login.phtml' not found in path 
(/var/www/zf/application/views/scripts/)

    Stack trace:

Request Parameters:
array (
  'controller' => 'Users',
  'action' => 'Login',
  'module' => 'default',
) 

another example try : new Zend_Form_Element_Text()

and new Zend_Form_Element_text() you will get a crazy error , i don't remember it now

just correct the file name to match the case in the controller class Like : Login.phtml

tawfekov