phpzend-frameworkzend-amf

How do I move Zend Framework From Development to Production?


I'm just wondering if anyone else has had problems moving the Zend Framework from development to production.

I changed my docroot to the public folder, updated my library path, but it's still not working out for me. The IndexController is working just fine, but my ServiceController is giving me an internal server error.

ServiceController

<?php

class ServiceController extends Zend_Controller_Action
{
  public function amfAction()
  {
   require_once APPLICATION_PATH . '/models/MyClass.php';
   $srv = new Zend_Amf_Server();
   $srv->setClass('Model_MyClass', 'MyClass');
   echo $srv->handle();
   exit;
  }
}

Solution

  • Thanks for your help today Jason. I actually got it working by adjusting my .htaccess file from the default to something else. Apparently ZF doesn't play nicely with 1and1. This is what I did to get it working:

    AddType x-mapp-php5 .php
    
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    Options +Indexes
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^domain\.com$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </IfModule>