|
|||
|
*
* * * * *****This is Solved***** see comments(replies) for this post *************************** Hello everyone i have just started to learn Zend framework but have problems installing it correctly details of Apache setting rewrite_module is on ( i.e. uncommented in Apache .htaccess) LoadModule rewrite_module modules/mod_rewrite.so I am Using port 8000. followed every step but... Problem "http://localhost:8000/" this works perfectly fine http://localhost:8000/index.php this also works because there is index.php there http://localhost:8000/index/ this is not working throws |--The requested URL /index/ was not found on this server. http://localhost:8000/index/index same with this, throws not found error as above Below are the details of simple application which just prints one echo line Can someone please help me, I am stuck since long.. Is there an error in path setting or some changes have to be made in Apache .htaccess file??? Your time and help is highly appreciated. Directory Structure parentFolder .......|--- myApp ................|--- bootstrap.php ................|--- controllers ........................|--- IndexController.php ................|--- models ................|--- views ........................|--- scripts ................................|--- index .......................................|--- index.phtml .......................................|--- add.phtml .......|--- Webroot ................|--- .htaccess ................|--- index.php (this just has require '../myApp/bootstrap.php' ![]() Contents of my file Index.php ############# <?php require '../myApp/bootstrap.php'; ################################ .htaccess ######## # Rewrite rules for Zend Framework RewriteEngine on RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php #1 Only continue if requested URL is not a file on disk. RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #2 Redirect request to index.php RewriteRule .* index.php # Security: Don't allow browsing of directories Options -Indexes ############################################### bootstrap.php ############# <?php error_reporting(E_ALL|E_STRICT); ini_set('display_errors', true); date_default_timezone_set('Europe/London'); set_include_path('../library' . PATH_SEPARATOR . get_include_path()); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); $frontController = Zend_Controller_Front::getInstance(); $frontController->throwExceptions(true); $frontController->setControllerDirectory('../myApp/controllers'); $frontController->dispatch(); ################################################# Index.phtml ############# <html> <head> <title><?php echo $this->escape($this->title); ?></title> </head> <body> <h1><?php echo $this->escape($this->title); ?></h1> </body> </html> ################################################## IndexController.php ################## <?php class IndexController extends Zend_Controller_Action { function indexAction() { $this->view->title = "My Albums"; } function addAction() { $this->view->title = "Add New Album"; } } ################################################# Thank You so much for you help and time ![]() Last edited by fossil_007 : 04-12-2008 at 05:22 PM. Reason: Solved |
|
|||
|
hi i asked this question but
i still tried to solve it and it is solved. I uninstalled Apache server and installed it again and while setting again I realized i wasted my time by uninstalling everything and installing it back i had this in my httpd.conf file of Apache server " AllowOverride None" which was supposed to be AllowOverride All Stupid me ![]() which bypassed my .htaccess file in directories now it works fine ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|