WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image upload : Failed to write file to disk (3 posts)

  1. xhark
    Member
    Posted 6 years ago #

    Hello,

    when I try to add image to an article, I've an error :
    Failed to write file to disk

    I've found in wp-admin/includes/file.php :

    $upload_error_strings = array( false,
    		__( "The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>." ),
    		__( "The uploaded file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form." ),
    		__( "The uploaded file was only partially uploaded." ),
    		__( "No file was uploaded." ),
    		__( "Missing a temporary folder." ),
    		__( "Failed to write file to disk." ));

    but I don't understand why this error appears.

    All directory "wp-content/upload" and subdirectory/files are chmod 777 and owner is good.

    php function restriction ? any idea ?

  2. xhark
    Member
    Posted 6 years ago #

    I've found the issue :

    change in php.ini :
    upload_tmp_dir="/tmp"

    it's a bug in php5, fixed since PHP 5.2.1

    more info : http://bugs.php.net/bug.php?id=39123

  3. imkieran
    Member
    Posted 5 years ago #

    Which version of wordpress are you running? I am having the same problem but don't seem to be able to find the php.ini file in wp-content/upload or a file.php in the includes folder =S

    I am running V2.6.2.

    Do you have any ideas what might be wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic