Last modified: 2014-02-12 23:32:48 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 T45469, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43469 - Can't link to files and upload - "Fatal exception of type MWException"
Can't link to files and upload - "Fatal exception of type MWException"
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.20.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-27 20:50 UTC by carchaias
Modified: 2014-02-12 23:32 UTC (History)
4 users (show)

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


Attachments

Description carchaias 2012-12-27 20:50:10 UTC
[2ae57982] 2012-12-27 20:21:30: Fatal exception of type MWException

Anytime I 

* try to upload a file OR 
* try to link to a not existing file (there are no files in my wiki)  

it says this error. Everytime with another hex-number in square brackets, time, date. This is on http://blechschaden.bplaced.net

I have another Wiki there wich is on 1.18.0 and it runs fine. I don't have root access.
Comment 1 Quim Gil 2012-12-28 21:50:57 UTC
Not sure if this will help (at least to identify the problem): can you change the language of the wiki to English and see if it still happens? Sometimes this error message has appeared in relation of non-English characters found in some translated string.

Usuall file upload works in MediaWiki 1.20.2. Changing severity to normal.
Comment 2 Alex Monk 2012-12-28 23:05:01 UTC
Can you look up that error in your error log? (somewhere like /var/log/apache2/error.log)
Alternatively set "$wgShowExceptionDetails = true"; in your LocalSettings.php and then try to trigger it again.
Comment 3 Bawolff (Brian Wolff) 2012-12-29 05:45:14 UTC
[offtopic] /me thinks the default error message should have instructions to enable $wgShowExceptionDetails to see details (and not just in an html comment). Didn't that use to be the case?

----

Do you have instant commons enabled? The error from your website is as follows:

Exception Caught: MWHttpRequest::factory: allow_url_fopen needs to be enabled for pure PHP http requests to work. If possible, curl should be used instead. See http://php.net/curl.

This is most likely because you checked use images from commons during the install process (or set $wgUseInstantCommons to true). Thus when you include an image, MW tries to check if wikimedia commons has a file. However to do that it has to contact commons. It tries to use CURL or php's fopen to do so. But curl is not installed, and allow_url_fopen is disabled in your php.ini. Hence the error.

Solution: Best solution - try to convince your web host to install the curl php extension. Second best, convince him/her to set allow_url_fopen to true in php.ini. Both of these usually require root access.

If you cannot convince them to do that, go into your LocalSettings.php and look for a line $wgUseInstantCommons = true; . Change the true to false. (Can also be $wgForeignFileRepos ). This will stop it from trying to use commons for image files, and hence make your wiki work. There will be some reduced features if HTTP access isn't available to your wiki, but 95% of the features do not require the wiki to do HTTP requests, so you'll mostly be fine.

--
>Sometimes this
>error message has appeared in relation of non-English characters found in some
>translated string.

Fatal exception of type MWException is a very generic error message. It can appear for almost anything.

----

Closing bug as invalid, since its not really a MediaWiki bug but a configuration problem. If my above advice doesn't apply, please don't hesitate to re-open the bug.

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


Navigation
Links