Last modified: 2014-02-12 23:55:08 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?
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.
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.
Created attachment 10027 [details] wrapper for PHP set_time_limit() The attached patch will allow us to skip set_time_limit() ;-)
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.