Last modified: 2014-02-12 23:55:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36437, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34437 - Cannot set time limit in safe mode
Cannot set time limit in safe mode
Status: RESOLVED WONTFIX
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-16 08:43 UTC by Uwe Kaminski
Modified: 2014-02-12 23:55 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
wrapper for PHP set_time_limit() (846 bytes, patch)
2012-02-16 19:54 UTC, Antoine "hashar" Musso (WMF)
Details

Description Uwe Kaminski 2012-02-16 08:43:41 UTC
I'm using a Debian 5.0.9, FastCGI hence php scripts are owned by a user.
SafeMode is activated and I don't have problems running the wiki using the default skin.

If I activate the MobileFrontend Extension I am getting this errors in the browser:

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /srv/www/n9wiki.de/http/extensions/MobileFrontend/library/WURFL/DeviceRepositoryBuilder.php on line 79
[...]
Warning: ZipArchive::extractTo() [ziparchive.extractto]: SAFE MODE Restriction in effect. The script whose uid is 5034 is not allowed to access /tmp owned by uid 0 in /srv/www/n9wiki.de/http/extensions/MobileFrontend/library/WURFL/Xml/Utils.php on line 64
[...]
Warning: XMLReader::open() [xmlreader.open]: Unable to open source data in /srv/www/n9wiki.de/http/extensions/MobileFrontend/library/WURFL/Xml/AbstractIterator.php on line 90

The wikipage itself is shown after this warnings

Are these warnings related? If not should I file three different bug reports?

Is there a way to hide this warnings?
Comment 1 Antoine "hashar" Musso (WMF) 2012-02-16 09:06:43 UTC
The set_time_limit() warning is indeed a bug.

The second issue is that sys_get_temp_dir() returns '/tmp' for which access is denied by your PHP configuration. That is not related to MediaWiki.

The third error is probably related to /tmp not being accessible.
Comment 2 Antoine "hashar" Musso (WMF) 2012-02-16 09:17:13 UTC
Note: the time limit issue is a bug in upstream WURFL library http://wurfl.sourceforge.net/ so we should probably open a new bug there.
Comment 3 Antoine "hashar" Musso (WMF) 2012-02-16 19:54:31 UTC
Created attachment 10027 [details]
wrapper for PHP set_time_limit()

The attached patch will allow us to skip set_time_limit() ;-)
Comment 4 Antoine "hashar" Musso (WMF) 2012-02-17 13:36:15 UTC
safe_mode is being dropped in PHP 5.4 so it is useless to introduce a new wrapper that will be "soon" obsolete. Instead, in MediaWiki, set_time_limit() calls should be wrapped with wfSuppressWarnings() / wfRestoreWarnings().

The bug could be reported upstream to WURLF but I have not find their bug reporter. So I guess the pragmatic way to fix the issue is to make PHP ignore the error by prefixing the set_time_limit() call with an @ at /extensions/MobileFrontend/library/WURFL/DeviceRepositoryBuilder.php line 79.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links