On Wed, 2 Aug 2006, Brion Vibber wrote:
Martin Jambon wrote:
Sorry if this is a trivial PHP question, but I can't figure out why I can't make the file function work from inside a MediaWiki extension, while it works perfectly when executed independently from Mediawiki (see code at the end of the message).
MediaWiki disables allow_url_fopen by default as a precaution.
$old_url_fopen = ini_set("allow_url_fopen", true); $result = file($url); ini_set("allow_url_fopen", $old_url_fopen);
works fine, thanks!
Martin
Note that current versions of PHP apparently don't actually take effect on that change at runtime.
-- brion vibber (brion @ pobox.com)
-- Martin Jambon, PhD http://martin.jambon.free.fr