symfony/zend integration - blank screen

Posted by user142176 on Stack Overflow See other posts from Stack Overflow or by user142176
Published on 2010-05-06T18:04:29Z Indexed on 2010/05/06 18:08 UTC
Read the original article Hit count: 296

Filed under:
|
|
|
|

Hi, I need to use ZendAMF on a symfony project and I'm currently working on integrating the two.

I have a frontend app with two modules, one of which is 'gateway' - the AMF gateway. In my frontend app config, I have the following in the configure function:

    // load symfony autoloading first
   parent::initialize();

    // Integrate Zend Framework
 require_once('[MY PATH TO ZEND]\Loader.php');
 spl_autoload_register(array('Zend_Loader', 'autoload'));

The executeIndex function my the gateway actions.class.php looks like this

   // No Layout
 $this->setLayout(false);
 // Set MIME Type
 $this->getResponse()->setContentType('application/x-amf; charset='.sfConfig::get('sf_charset'));
 // Disable cause this is a non-html page
 sfConfig::set('sf_web_debug', false);

 // Create AMF Server
 $server = new Zend_Amf_Server();
 $server->setClass('MYCLASS');
 echo $server->handle();
        return sfView::NONE;

Now when I try to visit the url for the gateway module, or even the other module which was working perfectly fine until this attempt, I only see a blank screen, with not even the symfony dev bar loaded. Oddly enough, my symfony logs are not being updated as well, which suggests that Synfony is not even being 'reached'.

So presumably the error has something to do with Zend, but I have no idea how to figure out what the error could be. One thing I do know for sure is that this is not a file path error, because if I change the path in the following line (a part of frontendConfiguration as shown above), I get a Zend_Amf_Server not found error. So the path must be correct. Also if I comment out this very same line, the second module resumes to normality, and my gateway broadcasts a blank x-amf stream.

spl_autoload_register(array('Zend_Loader', 'autoload'));

Does anyone have any tips on how I could attach this problem? Thanks P.S. I'm currently running an older version of Zend, which is why I am using Zend_Loader instead of Zend_autoLoader (I think). But I've tried switching to the new lib, but the error still remains. So it's not a version problem as well.

© Stack Overflow or respective owner

Related posts about symfony

Related posts about zend