WordPress.org

Support

Support » Multisite » [Resolved] Error saving media attachment. in wp3

[Resolved] Error saving media attachment. in wp3

  • I have a problem with upload media in wordpress 3
    when i want upload an music or video i see this eror message:

    Error saving media attachment.

    in my wp 3 just work upload photos

    when i wanted update my wpmu 2.9.2 to wp3 i saw this messages:

    Warning! WordPress encrypts user cookies, but you must add the following lines to wp-config.php for it to be more secure.
    Before the line /* That’s all, stop editing! Happy blogging. */ please add this code:

    define( ‘NONCE_SALT’, ‘y<nnK<A220t7&#>rhO,b0Pqj?%J67:`VxZYN]d|&k62N+tyZhi6bg}nweY=YsqYP’ );
    The wp-content/blogs.php file is deprecated. Please remove it and update your server rewrite rules to use wp-includes/ms-files.php instead.

    i think this is reason of my problem because:

    blogs.php and ms-files.php have difference codes
    upload file location is blogs.dir and this name is same of blogs.php

    any one can help me?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Read the instructions…
    1) add the salt line to wp-config.php
    2) Delete wp-content/blogs.php
    3) In your .htaccess file, change this line:
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    To this:
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    not work yet!!! only can upload photo

    Go to SuperAdmin -> Options

    Scroll down to Upload Settings

    Make sure the type you’re trying to upload is on the approved list.

    thats available for pdf zip mp3 doc jpg png etc

    And you’re trying to upload a ‘what’ file? 🙂

    Also, do apply the Nonce key to your wp-config.php file. If WP is telling you to do that, you really should.

    mp3 size is 68 kb

    Check your error_log on your server. See if there’s something that explains it. Or elaborates on it.

    Sun Aug 01 09:35:39 2010] [error] [client 68.71.132.67] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace., referer: http://domain.com/wp-admin/upload.php?message=3

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Then you’ll have to bump up the internal redirects.

    how can repair it?
    i think thats eror is from my .htaccess. my .htaccess is for wpmu 2.9.2

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [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]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    i changed line 15 for multisite.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Your internal redirects are not controlled by the htaccess file. Talk to your web host.

    they said must myself repair it 🙁

    I’m no expert in the range of .htaccess file settings for Multisite, but I don’t understand why your “#uploaded files” section includes this line:

    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

    I can’t think of a connection between uploaded files and the plugin directory, so checked my .htaccess and I don’t have this line. Now wondering how it got there…

    My #uploaded files section:

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    Can someone advise if there could be a reason for it?

    Similarly, you have 2 more rewrite conditions than I have, before the final rewrite rule; these ones:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    Hopefully someone will be able to confirm if these are wrong. Meantime it might be worth trying commenting out these lines to see if it helps.

    Redirects are controlled by .htaccess. Or, more specifically, a mal-formed .htaccess can cause internals to kick in and go blooey. I’ve eliminated them many times by realizing that my rewrites were Borked.

    To begin with, there are way too many conditions and rules in the .htaccess file.

    Temporarily comment these out:

    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    They may work but I don’t do it that way and it may be causing something else to go wrong.
    ^www\.(.*)
    is what is known as greedy and can lead to unexpected results. Get down to the basics first and then elaborate later.

    Then, this is commented out and then re-inserted at the bottom:

    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]

    I’m not exactly sure where they came from in the first place. The “!” negated the test. Leave them out.

    These two lines are from WPMu2.x and earlier:

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

    Apparently, they can be eliminated with WP3.x.

    The resultant WordPress section should then only contain these lines; and the trailing slash rules are optional:

    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,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]

    thats not work!!!
    how ever i see this now http://wordpress.org/support/topic/issue-with-upload-files-path?replies=5

    i change my .htaccess with

    # 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]
    </IfModule>

    # END WordPress

    now i can upload all files but cant upload video or music files like mp3 wave etc :((

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] Error saving media attachment. in wp3’ is closed to new replies.
Skip to toolbar