FS#43783 - [roundcubemail] roundcube 1.1.0-2 is now bricked with internal PHP error

Attached to Project: Community Packages
Opened by Patrick Goetz (pgoetz) - Wednesday, 11 February 2015, 10:29 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 04 January 2016, 14:55 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Package: roundcubemail 1.1.0-2

The 1.1.0-2 roundcubemail update appears to have bricked my roundcube installation, which now gives a fatal PHP error on my server. The error message I get in the httpd logs is:

[Wed Feb 11 04:02:54.450857 2015] [:error] [pid 15519] [client 67.189.113.124:4342] PHP Fatal error: Class 'Patchwork\\Utf8\\Bootup' not found in /usr/share/webapps/roundcubemail/program/include/iniset.php on line 73

This seems like an upstream bug; however I don't see anyone else on the http://www.roundcubeforum.net reporting similar problems, so maybe it's a packaging issue?
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 04 January 2016, 14:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.2-beta in community
Comment by Scott Thomson (smoothhound) - Wednesday, 11 February 2015, 12:09 GMT
I had the same issue today and seemed to fix it by uncommenting 'extension=iconv.so' in php.ini - I stress that this was an educated guess from a non-php developer and may cause your system to eat kittens...

However, after that I got stumped by further issues when sending which I suspect may be packaging. The first was solved by installing pear-mail-mime from AUR, but I'm now stuck at

[11-Feb-2015 11:42:36] WARNING: [pool www] child 5523 said into stderr: "NOTICE: PHP message: PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/webapps/roundcubemail/program/lib/Roundcube/rcube_smtp.php on line 111"

Which I suspect could be resolved by installing pear-net-smtp but I then got:

Warning: touch(): Unable to create file /usr/share/pear/.lock because Permission denied in PEAR/Registry.php on line 835
PHP Warning: touch(): Unable to create file /usr/share/pear/.lock because Permission denied in /usr/share/pear/PEAR/Registry.php on line 835 could not create lock file: fopen(/usr/share/pear/.lock): failed to open stream: No such file or directory
==> ERROR: A failure occurred in package().
Aborting...

Building pear-net-socket as a dependency, at this I decided I should stop clutching at straws.
Comment by Patrick Goetz (pgoetz) - Wednesday, 11 February 2015, 12:32 GMT
Uncommenting 'extension=iconv.so' in php.ini also worked for me. Now roundcube loads without generating any error messages, but, as you reported, sending doesn't work. When I try to send a message from roundcube it times out without generating any error messages in either the roundcube or postfix log files. How were you able to guess that pear-mail-mime package might now necessary? For that matter, how did you figure out that the necessary extension is iconv.so? I googled around for [PHP Patchwork] and couldn't find anything useful.

Edit: this is the line in the code where the fatal PHP error occurs:
// load the UTF-8 portablity layer from Patchwork
if (!function_exists('iconv') || !function_exists('utf8_encode') || !extension_loaded('mbstring')) {
\Patchwork\Utf8\Bootup::initAll();
}

So enabling the iconv extension means that \Patchwork\Utf8\Bootup::initAll(); is bypassed (which is good, since it appears to not be installed, and isn't given as a dependency).
Comment by Bogomil (smirky) - Wednesday, 11 February 2015, 12:41 GMT
Sadly, I found out that the package is updated without giving it much testing. After hours of digging and trying to fix my problems, I decided to try a new installation through the web installer. There, I found that I'm missing lots of third party libs, which I managed to download all of them except one. They were mostly AUR packages, which is pretty bad regarding that roundcubemail isn't. The packages which made everything work (so far) are:

pear-mail-mime
pear-net-socket (dependency for next package)
pear-net-smtp
pear-mail-mimedecode

The one and only dependency which I couldn't find was for Auth_SASL or something like that. You can make a quick check from the installer.
Comment by Patrick Goetz (pgoetz) - Wednesday, 11 February 2015, 14:48 GMT
Thanks for doing all that work, Bogomil; you've saved lots of other people from having to repeat this. It's obvious that a Arch repository package should not depend on anything in AUR, so if there is no way to get around these dependencies, then this is in and of itself a major bug that needs to be addressed; probably by pulling the necessary PHP modules into the Arch repository.

I have a thread open on http://www.roundcubeforum.net/ regarding this issue, and will report back if I can get feedback on Bogomil's commments.
Comment by Patrick Goetz (pgoetz) - Wednesday, 11 February 2015, 14:57 GMT
Here is the response from one of the roundcube admins:

"I would recommend installing using composer to resolve the dependencies."

I think if roundcube is going to continue to be packaged, it will be up to the package maintainer to install roundcube using composer and then make note of the dependencies so that they can be included in the PKGBUILD.
Comment by Bogomil (smirky) - Wednesday, 11 February 2015, 15:51 GMT
So in other words, all the php dependencies should be acquired, packaged and attached in the PKGBUILD so that all to be done clean in the future. For now only the one I mentioned is missing, am I correct?
Comment by Sergej Pupykin (sergej) - Wednesday, 11 February 2015, 16:01 GMT
1.1.0-3 is already in community and should work.

https://wiki.archlinux.org/index.php/Roundcube updated
Comment by Sergej Pupykin (sergej) - Wednesday, 11 February 2015, 16:49 GMT
1.1.0-4 has all deps from require section of composer.json-dist except roundcube/plugin-installer and patchwork/utf8
Comment by Patrick Goetz (pgoetz) - Wednesday, 11 February 2015, 17:41 GMT
Sergej -- that was an amazing response time! Everything is working again; thanks for taking care of this so quickly.
Comment by Marek Kozlowski (guayasil) - Tuesday, 08 September 2015, 15:04 GMT
  • Field changed: Percent Complete (100% → 0%)
The same problem with roundcubemail-1.1.2-1
BTW: using composer results in problems similar to:
http://stackoverflow.com/questions/22289640/trying-to-install-composer-on-osx-10-9
Comment by Sergej Pupykin (sergej) - Tuesday, 08 September 2015, 15:11 GMT
cannot reproduce with 1.1.2-1
Comment by Marek Kozlowski (guayasil) - Tuesday, 08 September 2015, 15:15 GMT
Bu I can :-(

[Tue Sep 08 11:30:39.426056 2015] [:error] [pid 22761] [client 91.208.250.110:35139] PHP Fatal error: Class 'Patchwork\\Utf8\\Bootup' not found in /usr/share/webapps/roundcubemail/program/include/iniset.php on line 74, referer: https://webmail.mini.pw.edu.pl/?_mbox=INBOX&_refresh=1&_task=mail

Maybe you have those necessary libraries thanks to previous upgrade to 1.1.x? I'm upgrading from 1.0.4...
Comment by Sergej Pupykin (sergej) - Wednesday, 23 December 2015, 08:34 GMT
can it be reproduced with 1.1.3-2 ?

Loading...