Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unable to upload files (images) to my mediawiki install. I think it may have something to do with it is being hosted as http secure(HTTPS). I followed carefully the instructions here.

I updated write permissions to the /images/ dir

drwxrwxrwx 2 apache apache 4096 Apr 13 19:04 images


file_uploads = On

In LocalSettings.php

$wgEnableUploads = true;
$wgFileExtensions = array('png','jpg','jpeg','gif'); 

When I try to upload it quickly refreshes the page without any errors or any indication anything went wrong, other than how fast it refreshed. When I navigate to the history of uploads it is empty. How can I troubleshoot this. Is it related to the secure http?

share|improve this question

You're barking up the wrong tree. I have SSL enabled on my mediawiki install and uploads work fine with no additional modifications.

You should look elsewhere, like what extensions are allowed to be uploaded, for example.

You also say "I updated my write permissions to the /images/". I hope that this is just poorly worded. Your permissions to /images don't matter, the web server (Apache?) user is the one doing the writing to that directory. Try using su to become the apache user and see if you can write to that directory if you're unsure about your permissions.

share|improve this answer
Thanks MDMarra I do have $wgFileExtensions = array('png','jpg','jpeg','gif'); in my LocalSettings.php as well so I dont think that is the problem. And I did su when I ran chmod is that what you mean? – zac Apr 14 '12 at 1:57
That's not what I mean. su can be used to do more than change to root, you can use it to change to any other account on the system. You should use it to switch user to your apache user and see if you can write to the /images directory if you're unsure about your permissions. – MDMarra Apr 14 '12 at 2:01
Oh, yes I can write as apache user. Here is what ls -l returns drwxrwxrwx 2 apache apache 4096 Apr 13 19:04 images – zac Apr 14 '12 at 2:05
@zac May not want to run the perm as 777. – jscott Apr 14 '12 at 2:23
@jscott Agreed, I am just trying everything... I will set it back to 755 – zac Apr 14 '12 at 2:25

I resolved this. I had to edit in LocalSettings.php and change

$wgServer = "";


$wgServer = "";

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.