The MU forums have moved to WordPress.org

Wordpress MU Image Upload problem (24 posts)

  1. james@amp-london.com
    Member
    Posted 15 years ago #

    Hi, I know I'm not the first to report this problem but after scouring the threads and posts on this forum I still have found no solution.

    I installed the multiuser version of Wordpress yesterday and everything installed as expected. However when I went to use the image upload functionality it didnt appear to work.

    I had a look around in the files and directories and noticed that the files WERE uploading but to a different directory to where the rest of the Wordpress CMS expected to find them.

    I have tried setting the values for Upload Path and Upload URL Path to the same directory but this seems to have no effect on the URL of an image when I upload it.

    It seems to upload it to "myBlog/wp-content\blogs.dir\1\files\" rather than the expected "myBlog/files/".

    Has anyone found a solution for this coz I know its bugging a lot of people?

    Thanks

  2. VentureMaker
    Member
    Posted 15 years ago #

    It's correct - WPMU uploads files to wp-content\blogs.dir\1\files\

  3. james@amp-london.com
    Member
    Posted 15 years ago #

    So how do I edit where wordpress mu thinks the files have been uploaded to. As I said in my original post the rest of the website is looking for uploaded images in "myBlog/files/" instead of "wp-content\blogs.dir\1\files\ "

  4. VentureMaker
    Member
    Posted 15 years ago #

  5. james@amp-london.com
    Member
    Posted 15 years ago #

    Ok so by following those instructions I have managed to change the upload path from "wp-content\blogs.dir\1\files\2008\11\" to "wp-content\blogs.dir\1\files\". However I need my images to be around 4 levels higher than this at "myBlog/files/". Where can I change this without declaring an absolute URL?

    Is it something to do with this? (from wp-includes/functions.php)

    "$uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false );"

  6. james@amp-london.com
    Member
    Posted 15 years ago #

    Any ideas VM?

  7. dsader
    Member
    Posted 15 years ago #

    wp-settings.php

    define( "UPLOADS", "wp-content/blogs.dir/{$wpdb->blogid}/files/" );
  8. james@amp-london.com
    Member
    Posted 15 years ago #

    You are a legend amongst men. Thanks a lot.

  9. joseph21
    Member
    Posted 15 years ago #

    Hi I have almost the same problem with the image uploader.. however for me, after uploading the images it doesn't show the image at all, but the files are in the WPMU.tld/files/2008/11/ directory (checked it via FTP).

    So, even if I try to access those images directly from the browser like http://WPMU.tld/files/2008/11/sample.gif - it just gives me a 404 Not Found.

    I'm using WPMU 2.6.3 - Is there a fix somewhere? I could't find it here.

  10. gswann
    Member
    Posted 15 years ago #

    I'm having this same problem. The images are being uploaded, but they aren't appearing in the posts. My assumption is that I have something wrong my Rewite language, but I can't figure out what I've done wrong. FWIW, only the Deafult style of permalinks is working, as well.

  11. VentureMaker
    Member
    Posted 15 years ago #

    joseph21 and gswann - are you sure that your .htaccess files are OK?

  12. piterallanjonson
    Member
    Posted 15 years ago #

    .htaccess - is nassasery

  13. gswann
    Member
    Posted 15 years ago #

    This is my .htaccess. I'd be grateful if someone can point out any errors.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase BASE/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    I'm on a Hostgator dedicated server. The WPmu installation is isolated in a different account from WP.org weblogs to avoid conflicts.

  14. VentureMaker
    Member
    Posted 15 years ago #

    You have: RewriteBase BASE/

    Should be: RewriteBase /

  15. gswann
    Member
    Posted 15 years ago #

    > Should be: RewriteBase /

    Check. I've had that both ways with no differences.

    It seems plausible that

    <IfModule mod_rewrite.c>

    is testing false. But if I remove that test, I get a 500 Internal Server Error.

    My symptoms: No substitution of true URI for images uploaded with the Image Uploader and no ability to use keyword-based permalinks (Default permalinks work okay).

  16. VentureMaker
    Member
    Posted 15 years ago #

    OK, are you on Windows or Linux?
    If Linux - is mod_rewrite enabled? If Windows - do you have that IIS module to work with URL rewrites?

  17. andrea_r
    Moderator
    Posted 15 years ago #

    Are you actually editing .htaccess and not htaccess.dist?

  18. gswann
    Member
    Posted 15 years ago #

    > Are you actually editing .htaccess

    Yes, directly on the server.

    > If Linux - is mod_rewrite enabled?

    This I have to check on.

    Thanks!

  19. gswann
    Member
    Posted 15 years ago #

    From Hostgator support:

    Yes, mod_rewrite is enabled on the server. We have tested other redirects and they were working properly. You would also get an error from the rewrite rules you have set up currently if this was not enabled.
    The implication is that "<IfModule mod_rewrite.c>" is testing true, but, if that's so, why do I get a 500 error when I remove the test?

    I'm truly at a loss. Boundlessly grateful for any guidance you can give me.

  20. gswann
    Member
    Posted 15 years ago #

    Got it. From Hostgator support:

    It appears the mod_rewrite module wasn't actually being loaded by Apache. I've corrected Apache configuration and removed the IfModule statements from the .htaccess file and left a backup of the original called .htaccess.bak and it's loading properly now without 500 errors.
    Thanks for all your help here. Eventually I hope to be good enough with this software to pay it forward.

  21. andrea_r
    Moderator
    Posted 15 years ago #

    Check httpd.conf, look for AllowFileOverride.

    Seems like it's not reading the htaccess file, and that's what does it.

  22. joseph21
    Member
    Posted 15 years ago #

    Could it be an ownership issue?

    I have joomla site in the same shared hosting account, and thus the folders became unwriteable even though the permissions for folders were set to 755 and files 644. When that happened my WPMU wasn't able to upload images nor create directories as well.

    I don't know what triggered the error. But I think it is a server issue.. my server must have change how PHP runs from CGI/Fast CGI to Apache mode.

  23. yair
    Member
    Posted 15 years ago #

    sorry
    i dont understand how to fix it
    can you tell me pls simply
    1. what i need to type in "upload path" field:?
    2. what i need to type in "Fileupload Url"?
    3. if there is something else to do...
    until its be fix

  24. Collections Australia Network
    Member
    Posted 14 years ago #

    A quick update on simple ways to be sure it isn't a coding/bug issue with image uploads by checking the site admin configuration.

    We work with version 2.6.2 WordPress MU.

    Check the Site Admin/Options page and go down to "Blog upload space" and "Maximum file upload" to adjust the settings. In MU WordPress setting changes in one blog site admin interface updates all the blogs in the MU installation with the same changes. Which means you don't need to go into each blog to change the upload settings individually.

    We set ours to:

    Blog upload space: 4024 MB
    Maximum file upload: 3000 KB

About this Topic

  • Started 15 years ago by james@amp-london.com
  • Latest reply from Collections Australia Network