Last modified: 2014-07-31 09:04:50 UTC
After upgrading to Ubuntu 14.04 generateSitemap.php dies with a fatal error: PHP Fatal error: Call to undefined function gzopen() in .../w/maintenance/generateSitemap.php on line 378 After doing some research, it seems this is because the PHP 5.5 build in Ubuntu 14.04 is compiled with large file support. The suggested fix for this problem is to use gzopen64() instead of gzopen(). See: http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists http://piwigo.org/forum/viewtopic.php?pid=151458 https://tracker.moodle.org/browse/MDL-45572 It seems this change can be made without impacting compatibility with other builds of PHP. Given that 14.04 is an LTS release others will likely hit this so would be good to fix.
Change 141970 had a related patch set uploaded by Rohan013: Replaces gzopen() function with gzopen64() https://gerrit.wikimedia.org/r/141970
Change 141970 abandoned by Rohan013: Replaces gzopen() function with gzopen64() Reason: I will redo it https://gerrit.wikimedia.org/r/141970
Change 142287 had a related patch set uploaded by Rohan013: Replaces gzopen() function with gzopen64() https://gerrit.wikimedia.org/r/142287
That is a bug in PHP: https://bugs.php.net/bug.php?id=53829 With a matching bug in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888 I would wont fix that bug for core since that impacts a lot of other projects and should be fixed by PHP / Ubuntu instead of in MediaWiki core.
(In reply to Antoine "hashar" Musso from comment #4) > I would wont fix that bug for core since that impacts a lot of other > projects and should be fixed by PHP / Ubuntu instead of in MediaWiki core. Sounds convincing... Anybody who wants to make that decision here and set this to WONTFIX for MediaWiki?
(In reply to Andre Klapper from comment #5) > (In reply to Antoine "hashar" Musso from comment #4) > > I would wont fix that bug for core since that impacts a lot of other > > projects and should be fixed by PHP / Ubuntu instead of in MediaWiki core. > > Sounds convincing... Anybody who wants to make that decision here and set > this to WONTFIX for MediaWiki? done.
WONTFIX seems like an odd choice for this bug. PHP being built with large file support is considered a "bug" in Ubuntu? There are examples of how to support both gzopen() and gzopen64() at the same time. Why not just take that path and not introduce an issue for anyone that needs or chooses to have PHP built with this capability?
Have it fixed in PHP Ubuntu? That is really an upstream bug and I definitely want to stop having to maintain hacks in our code to workaround third party issues, even if the workaround is quite easy, that adds to the pill of code we have to maintain.
Change 142287 abandoned by Hashar: Replaces gzopen() function with gzopen64() Reason: @Rohan013 sorry I was requesting to add some comments above the code to explain why it is needed. Ie a reference to PHP/Ubuntu upstream bug and a comment saying that gzopen() might not be available. Anyway, bug 66952 has been marked as WONTFIX on the ground that it is an upstream issue. So I am abandoning this bug. Please raise the issue to upstream bugs in PHP and Ubuntu. The PHP bug has a patch attached, it could be embed in the Ubuntu package and a hot fix PHP version released by Ubuntu to fix the issue properly. https://gerrit.wikimedia.org/r/142287
WONTFIX cannot be backported, adjust flag