Applicable to:
- Plesk Onyx for Linux
Symptoms
-
Unable to save an email address for a contact in Rouncube:
-
Such warnings can be found in
/var/log/plesk-roundcube/errors
when accessing or editing a contact:CONFIG_TEXT: [27-Mar-2019 09:56:27 UTC] PHP Warning: preg_replace_callback(): Compilation failed: invalid range in character class at offset 74 in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_vcard.php on line 530
[27-Mar-2019 09:56:27 UTC] PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 71 in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_vcard.php on line 547 -
Webmail PHP handler has been changed to PHP 7.3 using the article How to change a PHP version for webmail on Plesk for Linux:
# grep fastcgi /usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX plesk-php73-fastcgi
Cause
This is a know bug in Roundcube with the ID #6398 on Roundcube side, and with ID #PPPM-10312 on Plesk side.
Resolution
There are 2 possible solutions:
Follow the steps in How to change a PHP version for webmail on Plesk for Linux article again and change the PHP handler for webmail to a lower version, for example 7.2.
-
Connect to the server via SSH.
-
Do a backup of the file
/usr/share/psa-roundcube/program/lib/Roundcube/rcube_vcard.php
:# cp /usr/share/psa-roundcube/program/lib/Roundcube/rcube_vcard.php{,.bak}
-
Edit the file and replace the lines 528 and 535 with these ones:
CONFIG_TEXT: 528: '/item(\d+)\.(X-ABRELATEDNAMES)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w() -]*)(?:>!\$_)?./s',
CONFIG_TEXT: 535: '/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w() -]*)(?:>!\$_)?./si',
Note: The file
/usr/share/psa-roundcube/program/lib/Roundcube/rcube_vcard.php
will be overwritten by the next update of Roundcube shipped by Plesk.
Comments
0 comments
Please sign in to leave a comment.