开发者

Zend Translate Component - Blank page - no framework website

I'm trying to add Zend Translate component into a very basic no开发者_JS百科-framework website (since gettext is giving me headaches in shared hosting environment)

What I did is copy the library directory of the framework into the root directory of my site (i.e. $RootDirectory/Zend/*) and added this to a script that is included in all my pages:

require('Zend/Translate.php');    
$translate = new Zend_Translate(
    array(
        'adapter' => 'gettext',
        'content' => 'path/to/mo',
        'locale' => $myLocale
    )
);

and of course replaced all

_('text') 

with

$translate->_('text')

In my local environment is working with no problems. On the production server is displaying a blank page on all links.

I've tried suggestions related to setting error_reporting and display_errors with no luck. Memory_limit is the same on both servers.

Can someone help me get an error out of that blank page?

Thanks


Your production server is logging that error somewhere, for example by default on Ubuntu the errors get logged here:

/var/log/apache2/error.log

The simplest technique is to use the tail utility:

  1. log into the machine
  2. run sudo tail -f /var/log/apache2/error.log
  3. Hit refresh on the page again

You should see the PHP error printed out to the terminal Window.

Note that I've made some assumptions about your production server configuration, YMMV.


Could not figure out how to display the errors but figured out what was causing them.

Filezilla was sending the mo files in ASCII instead of Binary.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜