Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-10-2008, 11:54 PM
Junior Member
 
Join Date: Apr 2008
Posts: 10
Unhappy need help in setting Zend localhost:8000 works but localhost:8000/index does not :(

*
*
*
*
*
*****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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 12:08 AM
Junior Member
 
Join Date: Apr 2008
Posts: 10
Default sorry one correction

this line came on its own in the forum
Test Page for the SSL/TLS-aware Apache Installation on Web Site

it is basically .. "http://localhost:8000/"

Thanks again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 10:32 AM
Junior Member
 
Join Date: Apr 2008
Posts: 10
Thumbs up Problem Solved by me

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-16-2008, 07:17 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default

Ignore this post, posted in the wrong topic =/

Last edited by Filip : 04-16-2008 at 07:18 AM. Reason: posted it in somebody elses topic instead of mine :/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:25 AM.