1

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?

2 Answers 2

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.

5
  • 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? Commented Apr 14, 2012 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. Commented Apr 14, 2012 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 Commented Apr 14, 2012 at 2:05
  • 2
    @zac May not want to run the perm as 777. Commented Apr 14, 2012 at 2:23
  • @jscott Agreed, I am just trying everything... I will set it back to 755 Commented Apr 14, 2012 at 2:25
2

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

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

to

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.