Problems with Zend Framework
Posted: Fri Sep 01, 2006 7:05 am
Hi Guys, im trying test out Zend Framework on a Centos server /w XAMPP.
My file structure is as follows:
My code is as follows:
/index.php:
/.htaccess:
Despite the fact that /controllers/IndexController.php exists I get this error:
Does anybody have an ideas? Just FYI i'm following this tutorial: http://www-128.ibm.com/developerworks/e ... zend2.html
Thanks in advance!
My file structure is as follows:
Code: Select all
/ = web root
/ZendFramework-0.1.5/ ... <-- Including library.
/controllers/IndexController.php
/index.php
/index_html.php
/.htaccess/index.php:
Code: Select all
<?php
include 'Zend.php';
Zend::loadClass('Zend_Controller_Front');
$controller = Zend_Controller_Front::getInstance();
$controller->setControllerDirectory('controllers');
$controller->dispatch();
?>Code: Select all
RewriteEngine on
#RewriteLog "/opt/lampp/htdocs/sites/ZendTest/rewrite.log"
RewriteRule !\.(js|ico|gif|jpg|png|css|php)$ /index.php
php_value include_path "/opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library"
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "controllers/IndexController.php" was not found.' in /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend.php:190 Stack trace: #0 /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend.php(87): Zend::loadFile('IndexController...', 'controllers', true) #1 /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend/Controller/Dispatcher.php(170): Zend::loadClass('IndexController', 'controllers') #2 /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend/Controller/Dispatcher.php(136): Zend_Controller_Dispatcher->_dispatch(Object(Zend_Controller_Dispatcher_Token), true) #3 /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend/Controller/Front.php(254): Zend_Controller_Dispatcher->dispatch(Object(Zend_Controller_Dispatcher_Token)) #4 /opt/lampp/htdocs/sites/ZendTest/index.php(10): Zend_Controller_Front->dispatch() #5 {main} thrown in /opt/lampp/htdocs/sites/ZendTest/ZendFramework-0.1.5/library/Zend.php on line 190
Does anybody have an ideas? Just FYI i'm following this tutorial: http://www-128.ibm.com/developerworks/e ... zend2.html
Thanks in advance!