Author Topic: Php 5 upgrade problem with roundcube rc2 [SOLVED]  (Read 2185 times)

Offline risyasin

  • Newbie
  • *
  • Posts: 1
Php 5 upgrade problem with roundcube rc2 [SOLVED]
« on: January 25, 2008, 02:28:44 AM »
Hi,


I was using roundcube on my mail server. there was no problem.
but i need to upgrade the PHP to 5 (in fact 5.0.4). so i did it.

Roundcube is not working anymore.
Quote
PHP Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/domainler/mydomain.com/www/mail/program/include/rcmail_template.inc(428) : regexp code on line 1

PHP Fatal error: preg_replace() : Failed evaluating code:!$this->xml_command('object', 'name=''productname'' /') in /var/domainler/mydomain.com/www/mail/program/include/rcmail_template.inc on line 428

is there any known issue with this error message ?



___________________________________________________________

Anyone Who gets this error.
upto your PHP configuration magic quotes for GPC (get post cookie) directive is on.
Roundcube expects it's off by default.
in fact it's off by default (but if you are a lazy guy like me you can fix it not in the code but the config)
you can solve this issue by adding the following bold lines into access file (named .htaccess) as in the code.

Quote

 php_flag   display_errors   Off
 php_flag   log_errors   On
 php_value   error_log   logs/errors
 php_value   upload_max_filesize   5M
 php_value   post_max_size   6M
 php_flag magic_quotes_gpc off

Maybe Developers can evaluate this as a bug... (i will be appreciated)
add a little control into the code. something like this.
Code: [Select]

  if(strtolower(ini_get('magic_quotes_gpc'))!='off') {
       ini_set('magic_quotes_gpc','Off');
   }