Juan RodrÃguez escribió:
If you keep on receiving a blank page, this usually means that a PHP
error occurred. Check your apache error log.
OK, this is interesting. I found this in the apache log:
[Thu Feb 10 22:58:47 2011] [error] [client ::1] PHP Warning: Missing argument 3 for UploadFromUrl::initialize(), called in /var/www/mediawiki2/includes/api/ApiUpload.php on line 93 and defined in /var/www/mediawiki2/includes/upload/UploadFromUrl.php on line 35 [Thu Feb 10 22:58:47 2011] [error] [client ::1] PHP Fatal error: Call to undefined function curl_init() in /var/www/mediawiki2/includes/upload/UploadFromUrl.php on line 102
The first message show me a bug in the code, because the file UploadFromUrl.php defines the function: /public function initialize( $name, $url, $na, $nb = false )/ but never use the two last parameter inside the code: global $wgTmpDirectory; $localFile = tempnam( $wgTmpDirectory, 'WEBUPLOAD' ); $this->initializePathInfo( $name, $localFile, 0, true ); $this->mUrl = trim( $url );
Hopefully, it's very easy to fix :-)
The second message is about curl, as I suspected, it's not working. Could I add to a precompiled installation of php?
Open php.ini and search for extension_dir option. Change it to: extension_dir = "ext" (it may be there commented, or already right)
Then continue down to the list of extension= Uncomment extension=curl.dll
That should install curl in a normal php binary. Hopefully it won't be different in LAMP. You may need to restart apache after changing php.ini