Ok, so I am relatively new to Zend. I have created a new application and started to build an authentication system based on a guide. However, the server is kicking out an Internal Server Error.
Upon checking the PHP error logs I have been given the following two errors:
[Thu Jul 19 10:26:40 2012] [error] [client 80.194.255.4] PHP Warning: require_once(Zend/Application.php): failed to open stream: No such file or directory in /home/www-data/zend.danielgroves.net/htdocs/public/index.php on line 18
[Thu Jul 19 10:26:40 2012] [error] [client 80.194.255.4] PHP Fatal error: require_once(): Failed opening required ‘Zend/Application.php’ (include_path=’/home/www-data/zend.danielgroves.net/htdocs/library:.:/usr/share/php:/usr/share/pear’) in /home/www-data/zend.danielgroves.net/htdocs/public/index.php on line 18
The controller:-
class Admin_AuthController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$form = new Application_Form_login();
$request = $this->getRequest();
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
}
}
$this->view->form = $form;
}
}
Any ideas on what the cause of this could be? As I said I am new to Zend so I don’t really know where to start when it comes to these errors, especially as this is referencing files that were created by the Zend CLI tool.
Any pointers/suggestions etc would be muchly appriciated.
Dan.
Your application needs to be able to access the Zend Framework classes. Typically you would put these into the
libraryfolder in your app (Zend Tool does not do this for you). So from your downloaded copy of ZF, copy thelibrary/Zendfolder into yourlibraryfolder. You should end up with the file it is looking for at/home/www-data/zend.danielgroves.net/htdocs/library/Zend/Application.php, which will fix the error.