Opened 12 months ago
Closed 12 months ago
#1488506 closed Bugs (fixed)
PHP code issue
| Reported by: | konus | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.8-stable |
| Component: | PHP backend | Version: | 0.8-rc |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by alec)
I got the following error:
[31-May-2012 08:50:04 UTC] PHP Parse error: syntax error, unexpected T_STRING in C:\inetpub\wwwroot\roundcube\program\include\rcube_template.php(812) : eval()'d code on line 1 [31-May-2012 08:50:04 UTC] PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in C:\inetpub\wwwroot\roundcube\program\include\rcube_template.php(812) : eval()'d code on line 1
My configuration
- Windows Server 2008 R2 with IIS 7.5
- PHP 5.3.13
- "Microsoft SQL Driver v2.0 for PHP v5.2 in IIS" (installed via Microsoft Web Plattform installer)
- My connection string is: $rcmail_configdb_dsnw? = 'sqlsrv://sa:password@server\\instance/database';
- hMailServer
I also tried 0.7.2 with the same results.
Link to forum thread http://www.roundcubeforum.net/index.php?topic=9750
Change History (7)
comment:1 Changed 12 months ago by alec
- Description modified (diff)
- Milestone changed from later to 0.8-stable
comment:2 Changed 12 months ago by konus
I it a new clean install. I added "plugin_manager" and activated some plugins, especially "accounts". I did not change the skin.
After deactivation "plugin_manager" and changing the lines I got:
[04-Jun-2012 09:49:11 +0300]: !empty(cookie:mailviewsplitter) ? cookie:mailviewsplitter-5 : 195
[04-Jun-2012 09:49:11 +0300]: !empty($_COOKIE['mailviewsplitter']) ? $_COOKIE['mailviewsplitter']-5 : 195
[04-Jun-2012 09:49:11 +0300]: !empty(cookie:mailviewsplitter) ? cookie:mailviewsplitter+5 : 205
[04-Jun-2012 09:49:11 +0300]: !empty($_COOKIE['mailviewsplitter']) ? $_COOKIE['mailviewsplitter']+5 : 205
[04-Jun-2012 09:49:11 +0300]: browser:ie ? ('height: expression((parseInt(this.parentNode.offsetHeight)-'.(!empty(cookie:mailviewsplitter) ? cookie:mailviewsplitter+25 : 245).')+\\'px\\');') : '
[04-Jun-2012 09:49:11 +0300]: $this->browser->{'ie'} ? ('height: expression((parseInt(this.parentNode.offsetHeight)-'.(!empty($_COOKIE['mailviewsplitter']) ? $_COOKIE['mailviewsplitter']+25 : 245).')+\\'px\\');') : '
[04-Jun-2012 06:49:11 UTC] PHP Parse error: syntax error, unexpected T_STRING in C:\inetpub\wwwroot\roundcube\program\include\rcube_template.php(787) : eval()'d code on line 1
[04-Jun-2012 09:49:11 +0300]: !empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv-5 : 175
[04-Jun-2012 09:49:11 +0300]: !empty($_COOKIE['mailviewsplitterv']) ? $_COOKIE['mailviewsplitterv']-5 : 175
[04-Jun-2012 09:49:11 +0300]: !empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv+5 : 185
[04-Jun-2012 09:49:11 +0300]: !empty($_COOKIE['mailviewsplitterv']) ? $_COOKIE['mailviewsplitterv']+5 : 185
[04-Jun-2012 09:49:11 +0300]: browser:ie ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv+5 : 180).')+\\'px\\');') : '
[04-Jun-2012 09:49:11 +0300]: $this->browser->{'ie'} ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty($_COOKIE['mailviewsplitterv']) ? $_COOKIE['mailviewsplitterv']+5 : 180).')+\\'px\\');') : '
[04-Jun-2012 06:49:11 UTC] PHP Parse error: syntax error, unexpected T_STRING in C:\inetpub\wwwroot\roundcube\program\include\rcube_template.php(787) : eval()'d code on line 1
[04-Jun-2012 09:49:11 +0300]: browser:ie && browser:ver < 7 ? 'gif' : 'png'
[04-Jun-2012 09:49:11 +0300]: $this->browser->{'ie'} && $this->browser->{'ver'} < 7 ? 'gif' : 'png'
[04-Jun-2012 09:49:11 +0300]: config:preview_pane == true ? ' checked=checked' : '
[04-Jun-2012 09:49:11 +0300]: $this->app->config->get('preview_pane',get_boolean('')) == true ? ' checked=checked' : '
[04-Jun-2012 06:49:11 UTC] PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in C:\inetpub\wwwroot\roundcube\program\include\rcube_template.php(787) : eval()'d code on line 1
comment:3 Changed 12 months ago by alec
Last single quote in expressions are removed. This looks to me as PHP bug regarding code of parse_attrib_string() function (main.inc file). Especilly the regular expression there.
comment:4 Changed 12 months ago by alec
... or stripslashes(). Do you have magic_quotes_gpc enabled?
comment:5 Changed 12 months ago by alec
I mean magic_quotes_sybase. Try to change these options values.
comment:6 Changed 12 months ago by konus
Yes, magic_quotes_sybase was enabled (was needed for an other project called dokuwiki). Thank you! My problem is solved and this ticket can be closed.
May I suggest to add a check to the installer on page 1 (part "Checking php.ini/.htaccess settings") to check this setting during install?
comment:7 Changed 12 months ago by alec
- Component changed from Addressbook to PHP backend
- Resolution set to fixed
- Status changed from new to closed
Fixed in 0b6d022e.

This is strange. Do you use any plugins or modified skin? Does it happen with vanilla installation? Find
$value = $this->parse_expression($attrib['expression']); return eval("return Q($value);");in include/rcube_template.php file and change to:
write_log('errors', $attrib['expression']); $value = $this->parse_expression($attrib['expression']); write_log('errors', $value); return eval("return Q($value);");Try to reproduce the issue and logs/errors output attach to this ticket.