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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-21-2007, 01:03 AM
Member
 
Join Date: Nov 2007
Posts: 33
Default 404 Error Invoking non-indexController in Mac OS X

Hi, I have installed Zend Framework 1.0.2 on Mac OS X 10.5.1. However, I'm getting a 404 error message for all controllers except for IndexController.php. Next, my boot strap file looks as follows:

my_app/public/index.php:

PHP Code:
<?php

/**
* Error Reporting
*/
error_reportingE_ALL E_STRICT );
ini_set'display_errors''on');
ini_set'include_path'ini_get('include_path') . PATH_SEPARATOR '../library' );

/**
 * Zend Loader
 */
require_once 'Zend/Loader.php';
require_once 
'Zend/Db.php';

/**
 * Require Classes
 */
Zend_Loader::loadClass'Zend_Config_Ini' );
Zend_Loader::loadClass'Zend_Controller_Front' );
Zend_Loader::loadClass'Zend_Registry' );
Zend_Loader::loadClass'Zend_Db' );
Zend_Loader::loadClass'Zend_Db_Table' );

/**
 * Setup Ini Configuration
 */
$config = new Zend_Config_Ini'../config/config.ini''development' );

/**
 * Initialize Database.
 */

$database Zend_Db::factory$config->database, array( 'host' => 'localhost',
                                      
'dbname' => 'my_app_db'
                                      
'username' => 'root',
                                      
'password' => '') );
Zend_Db_Table::setDefaultAdapter$database );

/**
 * Setup Controller
 */
$front Zend_Controller_Front::getInstance();
//$front->setBaseUrl( '/public' );
$front->setControllerDirectory'../application/controllers' );

if ( 
$config->environment == 'development' )
    
$front->throwExceptionstrue );

/**
 * Start dispacher.
 */
$front->dispatch();


?>
application/controllers/UpdateController.php:

PHP Code:
<?php

class UpdateController extends Zend_Controller_Action {
    
    function 
indexAction() {
        
    }
    
    function 
createAction() {
        
    }
    
    function 
editAction() {
        
    }
    
    function 
updateAction() {
        
    }
    
    function 
listAction() {
        
    }
    
}

?>
Next, I'm using PHP 5.2.4 with Apache 2.2.x. Finally, I have tried the same set of files on Windows XP and everything works as expected. Thus, is there a configuration step that I'm missing on Mac OS X 10.5?

Thanks in advance,

-Conrad

Last edited by conradwt : 11-21-2007 at 03:14 AM. Reason: Put PHP into the proper format.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-24-2007, 09:27 PM
Member
 
Join Date: Nov 2007
Posts: 33
Default [SOLUTION] 404 Error Invoking non-indexController in Mac OS X

Hi, I resolved the issue that I was seeing in regards to the 404 errors for non-IndexController. In Leopard, the httpd.conf sets the default:

AllowOverride None

within

Quote:
<Directory "/Library/WebServer/Documents">

...

</Directory>
This needs to be changed to

AllowOverride All

Finally, after you make this change to your httpd.conf file and restart Apache, then you should be able to invoke the non-IndexController successfully.

-Conrad
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 09:25 PM.