Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

php.ini

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

2 Answers 2

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
1  
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
2  
@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 = "http://www.mywiki.com";

to

$wgServer = "https://www.mywiki.com";

share|improve this answer

Your Answer

 
discard

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.