I'm trying to add Zend Translate component into a very basic no-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:
sudo tail -f /var/log/apache2/error.log
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.