• Hello,

    I installed WordPress 2.5 today in order to test it for a project. This test install is on my own little web server (linux ubuntu 7.10, apache2, php5, mysql).

    The install was fine but it seems I can’t upload files through WordPress. I first had a problem with the media uploader (due to a not up-to-date Flash player) but that is fixed now. Now I have this problem: every file upload (small jpeg or png, 5MB MP3 file…) ends up with: “Failed to write file to disk.” (See a screenshot.)

    I thought there was a problem with permissions, but no matter what I did it didn’t work. I even tried using 777 and 666 permissions on all folders and files, but that didn’t fix it.

    I used the Apache directives in a .htaccess file as suggested here, but there was no effect.

    I just wish WordPress would give me a more explicit error. I turned on Debug mode in my wp-config.php and I only got some PHP warnings:

    Notice: Undefined variable: errors in /.../wordpress25/wp-admin/includes/media.php on line 298
    
    Notice: Undefined variable: id in /.../wordpress25/wp-admin/includes/media.php on line 298

    Just for the record, line 298 says:
    return wp_iframe( 'media_upload_type_form', 'image', $errors, $id );
    Not sure if this is related to the actual problem.

    Well, that’s it. Any idea?

    (By the way, I have a Movable Type install on the same server, and image upload works fine with that install. But MT doesn’t use PHP for file upload, unless I’m mistaken. Oh, and max upload size for PHP is set to 10 MB).

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am also having this same exact issue.

    Version 2.3.2 works on my server, version 2.5 does not.

    php 5.2.5
    apache 2
    FreeBSD 6.2

    Thread Starter florent-v

    (@florent-v)

    OK, I think I got it. I had a problem with my PHP configuration (on my VPS) where PHP couldn’t access the temporary upload directory. I fixed that by creating a specific temp directory (/tmp/php) configuring PHP to use it, and setting the open_basedir value so that /tmp/php would be allowed. I’m not sure ALL of this was necessary, but at least some of it did the trick.

    Well, I still have to confirm that my problem is fixed. Actually, I revamped my PHP configuration after a second PHP application couldn’t upload files as well. Now it works for that application, but since I didn’t keep my test WordPress 2.5 installation I cannot check right now that it works for WordPress as well. I’ll report on this later on.

    Thread Starter florent-v

    (@florent-v)

    I can confirm that the problem was the PHP configuration.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Media upload: “Failed to write file to disk.”’ is closed to new replies.