Trouble uploading medias in my MU subdomains (18 posts)

  1. wp-crazy
    Posted 4 years ago #

    Hello WP Masters!

    I have a same problem as two past posts:



    I tried to follow the advices of one, then of the other, but none would help my website work.

    My .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress

    I use WP Multisite as follows : http://www.domain.com and http://subdomain1.domain.com ... http://subdomain2.domain.com ...

    My network settings:

    Upload Path : wp-content/blogs.dir/12/files

    Upload Url Path :

    Fileupload Url : http://subdomain12.domain.com/files

    I am clearly not a pro, and I don't understand what the Override On/Off setting means, and I don't know where to check. I'm using a dedicated server that I manage via ISP Config

    I beg for help before frustration makes me destroy my office ! jk ;)

  2. I am clearly not a pro, and I don't understand what the Override On/Off setting means, and I don't know where to check. I'm using a dedicated server that I manage via ISP Config

    Then you need to go ask your webhost to look at your httpd.conf file, becuase that's the very first thing to check :)

  3. wp-crazy
    Posted 4 years ago #

    Hi Ipstenu,

    Thanks for your answer. I asked him, and he told me that it is. can I check myself using Filezilla? Or is the file located elsewhere?

  4. If you have root access, which you should with a dedicated server, yes. But you should go in via SSH and you have to know where the httpd.conf file is (it's different on different kinds of servers).

    I would show your host this: http://codex.wordpress.org/Multisite_Network_Administration#Apache_Virtual_Hosts_and_Mod_Rewrite

  5. wp-crazy
    Posted 4 years ago #

    All done, the Override was allowed. the situation is still the same though. I can upload pictures, but they appear as a broken link as soon as i uploaded them.

  6. We'll need a link to your site, and the problem, to say more. But basically something isn't set up right. Either your .htaccess isn't correct (which it looks to be fine) or the server isn't reading it.

  7. wp-crazy
    Posted 4 years ago #

    http://www.quelchoix.fr is my website,
    and here is the exemple of a picture uploaded on a subdomain that uploads but appears broken : http://salledebain.quelchoix.fr/files/2012/06/Fotolia_4671226_XS.jpg

  8. Okay,

    http://salledebain.quelchoix.fr/wp-includes/ms-files.php?file=/2012/06/Fotolia_4671226_XS.jpg is also blank, and a blank page is a php error.

    You're using Twenty Eleven, so it's not the theme. Check your server's error log. See if there's anything with that URL and an error.

  9. wp-crazy
    Posted 4 years ago #

    I checked the server's error log, nothing abnormal there either. And I don't see that the URL is blank, but just that the picture is impossible to locate.
    Please any idea of what i can do to make it work ? I've been stuck on that issue for almost a week already ! :0

  10. wp-crazy
    Posted 4 years ago #

    I feel like my situation is not entirely clear.
    I'm using the regular multisite version of wordpress 3.4, and I don't use domain mapping plugins or anything like that, since my permalinks are rewritable and that besides the pictures, my domain and subdomains work perfectly.

    Thanks for reading my posts and trying to help me ! :)

  11. Nah, it's clear. It's just..

    Well the issue is your server's not able to handle the ms-files.php code :/

    See http://salledebain.quelchoix.fr/files/2012/06/Fotolia_4671226_XS.jpg is translated by the .htaccess to this:


    and the ms-files.php translates that to


    Where Number is the blog number.

  12. wp-crazy
    Posted 4 years ago #

    isn't it the ms-files itself that has a problem ?

    If we look at the http header of the page:
    http://salledebain.quelchoix.fr/wp-includes/ms-files.php?file=/2012/06/Fotolia_4671226_XS.jpg we can see that the headers are there, specially "Content-Lenght" :

    -rw-r--r-- 1 web1 client0 71915 25 juin 01:39 Fotolia_4671226_XS.jpg

    So it seems like it is the page ms-files.php that doesn't get to correctly display the image (using Firefox, it says that the image cannot be chargedbecause it contains errors)

    here is the header file :


    GET /wp-includes/ms-files.php?file=/2012/06/Fotolia_4671226_XS.jpg HTTP/1.1
    Host: salledebain.quelchoix.fr
    User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    Pragma: no-cache
    Cache-Control: no-cache

    HTTP/1.1 200 OK
    Date: Tue, 26 Jun 2012 08:46:10 GMT
    Server: Apache/2.2.16 (Debian)
    x-powered-by: PHP/5.3.3-7+squeeze9
    Etag: "20683c8c7e7f85a46049f3b08eca6707"
    Expires: Thu, 27 Aug 2015 18:32:50 GMT
    Content-Length: 71915
    Last-Modified: Sun, 24 Jun 2012 23:39:38 GMT
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Content-Type: image/jpeg

    What do you think ?

  13. No, ms-files.php is fine. It's your server that can't handle the file :/

    Basically the file is doing what it's supposed to do, but your server doesn't have the right permissions. Which is why we always ask 'Is allowoverride set to ALL?'

  14. wp-crazy
    Posted 4 years ago #

    here is part of the vhost of my site : ( the "---" signs are because i don't want everyone to see the directories in my server :/ )

    <Directory /------/------/quelchoix.fr/------>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

    so it is set on "All".

  15. Try this:

    AllowOverride Fileinfo Options All
  16. wp-crazy
    Posted 4 years ago #

    on which line?

  17. Where you have AllowOverride All

    Replace both of them with the AllowOverride Fileinfo Options All

  18. wp-crazy
    Posted 4 years ago #

    ok thanks ! ;)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.