Support » Fixing WordPress » upload feature bug?

  • I’ve tried to setup the image upload feature with .72 beta release 2, and I keep getting an error. I’ve set the folder to 777, and the b2upload.php file to 777, and still no luck. below is what the error looks like.
    Warning: move_uploaded_file(/home/affectus/public_html/blog/images/uploads/seahawk_sept14.gif): failed to open stream: Permission denied in /home/affectus/public_html/blog/wp-admin/b2upload.php on line 199
    Warning: move_uploaded_file(): Unable to move ‘/tmp/phpbaGbJ1’ to ‘/home/affectus/public_html/blog/images/uploads/seahawk_sept14.gif’ in /home/affectus/public_html/blog/wp-admin/b2upload.php on line 199
    Couldn’t Upload Your File to /home/affectus/public_html/blog/images/uploads/seahawk_sept14.gif.

Viewing 15 replies - 1 through 15 (of 18 total)
  • I’m also getting a ‘cannot upload file’ error.
    Other niggly things:
    not showing any admin-added file types in the popup window (under ‘you can upload files of type’).
    popup window title says ‘b2>upload..’

    I was having that problem for a while but then it magically disappeared. However, when i upload files, i can’t view them on the web because they are not chmod’ed to be viewable.

    Anyone have a solution?

    Hi scooter,
    It sounds like the error may not be the permissions in your images but the permissions in the tmp directory. In order to successfully move the file from temp to your images directory the web app needs to (in effect) delete the file from /tmp.
    Can you check what permissions your files have in /tmp?

    I’m getting the same error.
    But my webhost has the tmp-Folder for all users on the server, so I can’t check or change its rights, since it’s outside of my account… :’-(
    Anything I can do to solve the problem?
    (Maybe ask my provider to do sth. with the rights granted to PHP for the /tmp-folder?)
    And are you sure it’s the rights there and not safe mode?
    I had a look at, and even though I now nearly nothing about PHP, I gues it could be safe mode…
    P.S.: Using V 0.71…

    Figured out that I just forgot to chmod b2uploads.php.
    Set it & the directory to 777 and it works now… 🙂

    I did this and still get the “Couldn’t Upload Your File ” error.

    Try to change move_uploaded_file(): by copy():

    Still a problem for me. I know that when I was running b2 and changed the permissions, things upload fine, can’t seem to make the changes (all the ones suggested here) to upload successfully.
    The following is the error message I still encounter.
    Warning: move_uploaded_file(/home/theabsur/public_html/blog/images/bos.gif): failed to open stream: Permission denied in /home/theabsur/public_html/blog/wp-admin/b2upload.php on line 199
    Warning: move_uploaded_file(): Unable to move ‘/tmp/phpinuWPN’ to ‘/home/theabsur/public_html/blog/images/bos.gif’ in /home/theabsur/public_html/blog/wp-admin/b2upload.php on line 199
    Couldn’t Upload Your File to /home/theabsur/public_html/blog/images/bos.gif.

    I also have yet to be able to upload files. Using the latest CVS.

    I even tried to use the Quicktags, but no luck since I get a header error…
    Warning: Cannot modify header information – headers already sent by (output started at /home/theabsur/public_html/blog/b2-include/b2functions.php:1004) in /home/theabsur/public_html/blog/wp-admin/b2edit.php on line 166

    I’ve successfully tested image uploads on my server.
    The notes about the move_uploaded_file() function mention that the open_basedir directive in your php.ini configuration file can affect how things work. If that directive is in use on your server, it could be what’s causing the file move to fail.
    I’ve just commited a patch to CVS that should work around that particular situation.

    Would you be able to breakdown down how you accomplished the image/file upload? Would I be required to come up with my own CVS patch?

    we had this same problem with our host. it turns out open_basedir errors are thrown from php security settings.
    what worked for us was to run it as php-cgi. for this to work, we needed to add a line to .htaccess
    AddType php-cgi .php
    we’re already running a homegrown php content mgmt system that uploads images via php-cgi, so it was especially puzzling why it didn’t work right off the bat.
    wordpress must do something that makes it explicitly require this directive.
    it was that one little thing that finally got it working, which has really disillusioned my programmer mate. hope this will help someone else.

    I’m haven’t been able to upload any images, either. It shows as a successful upload, albeit the file size always shows as 0kbs. In reality, they don’t upload to the referenced directory.
    I have the latest CVS. What is the fix for this?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘upload feature bug?’ is closed to new replies.