Thanks Claudia! Thanks a ton! I have been fighting with my hosting provider to disable zend optimizer and he has been giving me all sorts or excuses. You nailed the problem well. After making these changes, cakephp is now alive!
thanks and regards, Rex On Oct 30, 3:10 pm, Claudia <[EMAIL PROTECTED]> wrote: > I fixed this problem on my (local) machine by changing the translation > function __ in the basics.phpfile. > > The translation function __ uses debug_backtrace() to find out where a > translation was called from which can cause problems in combination > with the zend optimizer extension. But as all the translations for my > app are in the translation file default, I do not need to check > whether the translation is called from. > > Therefore I replaced to code of __ by this one: > <code> > function __($singular, $return = false) { > if (!class_exists('I18n')) { > uses('i18n'); > } > if ($return === false) { > echo I18n::translate($singular, null, 'default'); > } > else { > return I18n::translate($singular, null, 'default'); > }} > > </code> > > and the translation function __n by this one: > <code> > function __n($singular, $plural, $count, $return = false) { > if (!class_exists('I18n')) { > uses('i18n'); > } > if ($return === false) { > echo I18n::translate($singular, $plural, 'default', 5, $count); > } > else { > return I18n::translate($singular, $plural, 'default', 5, $count); > }} > > </code> > > Hope it helps > > Claudia > > On Oct 27, 11:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I have submitted a request with my hosting provider. I am hoping he > > will respond soon. > > > On Oct 26, 7:01 pm, francky06l <[EMAIL PROTECTED]> wrote: > > > > have you tried to ask your hosting peovider ? > > > I had the same problem and I asked if I could tweak as follow : > > > > - having a CGI that would runphpusing a special .ini (they have done > > > it, since I can't control everything in it) > > > - make it workd in my htaccess as : > > > > Action application/x-httpd-php5 /php5.cgi > > > > the cgi does contain : > > > > #!/bin/sh > > > exec /usr/local/cpanel/cgi-sys/php5 -c /home/mydomain/php.ini > > > > hope this helps > > > > On Oct 26, 11:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > As I had written in my previous post:"cannot accessphp.ini as I am > > > > using a shared hosting." > > > > So, I need some .htaccess based solution. > > > > > I am running cake 1.1, 1.2-alpha and 1.2-pre-beta on the same server > > > > but only pre-beta is giving problems. > > > > > regards, > > > > Prateek > > > > > On Oct 25, 9:15 pm, francky06l <[EMAIL PROTECTED]> wrote: > > > > > > To disable Zend optimiser you need to comment the lines inphp.ini. > > > > > > On Oct 25, 5:01 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > > Hi all, > > > > > > > I tried the following: > > > > > > > 1. lemp>>Replace __("CakePHP: the rapid developmentphpframework", > > > > > > true) ... did not work > > > > > > > 2. Kunthar>>adding "php_flag display_errors on" in .htaccess file > > > > > > ... > > > > > > did not work > > > > > > > 3. Zend Optimizer was running. I tried disabling it by adding the > > > > > > following lines in .htaccess file. I was not able to disable it. > > > > > > php_flag display_errors on > > > > > > php_flag zend_optimizer.optimization_level 0 > > > > > > php_flag eaccelerator.enable 0 > > > > > > php_flag eaccelerator.optimizer 0 > > > > > > php_flag zlib.output_compression off > > > > > > > Does anybody have a better idea of how to disable Zend Optimizer? I > > > > > > cannot accessphp.ini as I am using a shared hosting. > > > > > > Zend Optimizer version is 3.2.2. > > > > > > This problem only appears on the above server configuration. I am > > > > > > running WAMP on my laptop and it does not appear there. > > > > > > > Still no luck. Thanks to all for your suggestions. If there are any > > > > > > other ideas, do let me know. > > > > > > > regards, > > > > > > Rex > > > > > > > On Oct 25, 2:53 am, francky06l <[EMAIL PROTECTED]> wrote: > > > > > > > > The zend optimizer fails on the __("") ..I had to remove > > > > > > > fromphp.ini > > > > > > > in order to avoid the crash ..Maybe this is linked. > > > > > > > > On Oct 24, 11:40 pm, lemp <[EMAIL PROTECTED]> wrote: > > > > > > > > > On Oct 24, 6:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > > > > > > wrote: > > > > > > > > > > After install, when I go to the cake link, a blank page is > > > > > > > > > returned. > > > > > > > > > Had the same problem. > > > > > > > > > In cake/libs/view/templates/layouts/default.ctp at line 59 > > > > > > > > > Replace __("CakePHP: the rapid developmentphpframework", true) > > > > > > > > by > > > > > > > > any string and it will work. > > > > > > > > > The same function is used on line 45, so I presume the problem > > > > > > > > is > > > > > > > > contextual but I don't know why yet. > > > > > > > > > Someone has a suggestion? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---