The MU forums have moved to WordPress.org

Image upload error (21 posts)

  1. danalog
    Member
    Posted 17 years ago #

    I get the following error when uploading images:

    =========
    Het ge-uploade bestand kon niet naar /home/pent2290/schitterendorganiseren.nl/www/wp-content/blogs.dir/1/files//2007/03 worden verplaatst.
    Warning: Cannot modify header information - headers already sent by (output started at /home/pent2290/schitterendorganiseren.nl/www/wp-admin/admin-functions.php:1892) in /home/pent2290/schitterendorganiseren.nl/www/wp-includes/functions.php on line 1243

    138
    ==========

    What could be the solution? I've tried everything I could think of...

  2. drmike
    Member
    Posted 17 years ago #

    Any idea what that translates to? I haven't spoken German in over 20 years.

    Or whatever language that is since babelfish is telling me that it's not German.

  3. gumdrop
    Member
    Posted 17 years ago #

    Dutch?

  4. drmike
    Member
    Posted 17 years ago #

    Good answer. (What is the *.nl tld anyway?)

    Says that it can't move the file uploaded to that directory. usually that's a sign where blogs.dir and the underlying subdirectories isn't set to 777.

    - Make sure PHP's safe mode is turned off.
    - Try the following command from a command prompt within blogs.dir:

    find * -type d -exec chmod 777 {} \;

    I think that's right. :)

    Hope this helps,
    -drmike

  5. gumdrop
    Member
    Posted 17 years ago #

    netherlands

  6. danalog
    Member
    Posted 16 years ago #

    It was the safemode. I turned it off in .htacces

  7. drmike
    Member
    Posted 16 years ago #

    That's good that you got it resolved. Thanks for the followup. :)

  8. danalog
    Member
    Posted 16 years ago #

    Woops... the problem is back! Seems the owner of the directories is different. Could that be a problem?

  9. drmike
    Member
    Posted 16 years ago #

    If it's set to 777, it should be.

    Your host may have turned safe_mode back on. They do stuff like that.

  10. danalog
    Member
    Posted 16 years ago #

    Hi drmike... You were right, the bastards :) They turned safe_mode back on. Its off now, again.

  11. drmike
    Member
    Posted 16 years ago #

    Not a problem. :)

  12. cburell
    Member
    Posted 16 years ago #

    Well, I'm getting a similar message, checked that safe mode is off (it was and is), and that permissions for blogs.dir were at 777. I still get this:

    The uploaded file could not be moved to /home/me/public_html/wp-content/blogs.dir/126/files//2007/09.
    Warning: Cannot modify header information - headers already sent by (output started at /home/me/public_html/wp-admin/admin-functions.php:1904) in /home/me/public_html/wp-includes/functions.php on line 1340

    Any help would be appreciated.

    Running WPMU 1.1.1.1 (I know I need to upgrade:), on a VPS with PHP 5.2.3 and MySQL 5.0.27 standard.

    Thanks to any good sam out there.

  13. drmiketemp
    Member
    Posted 16 years ago #

    Please open up your database and see what you have set for options for the following for your blogs:

    uploads_use_yearmonth_folders
    upload_path

    I note that the path you give is incorrect but I don't remember it as an issue in the past.

    Have you checked to see if those subdirectories exist?

  14. cburell
    Member
    Posted 16 years ago #

    thanks drmike.

    More background. My VPS support deleted my site (not careful readers of support tickets, these guys), and restored a backup.

    This is the first time I've edited the site since the restoration.

    I checked the subdirectories (I noticed that weird "//" too), and there was no /09 directory in: /home/me/public_html/wp-content/blogs.dir/126/files//2007/09.

    There was, though, a /2007, so I don't know why that second fwd slash is there. Weird.

    As for opening up my db to check settings in
    uploads_use_yearmonth_folders
    upload_path
    , I'm afraid I don't know how to do that. I tried to find it phpMyAdmin, but couldn't.

    Which brings me to a larger issue. I'd be willing to pay anybody hourly rates to play ground control on Skype to teach me the ropes on some of these simple operations. It's not changing code that's so hard, it's figuring out how to find the pertinent files in cPanel/WHM in order to do so.

    I've read and sympathized with the frustration of helpers here with relative newcomers like me. But I'm a "learn by doing" type, and I'm willing, again, to pay anybody who will help me learn on an as-needed basis.

    Make sense?

    Game?

    Because right now I'm stuck at your first suggestion, though I'm sure it would be easy enough to do if I just knew how to find what you tell me to look at.

    Many thanks :)

  15. anchal27
    Member
    Posted 16 years ago #

    The installation of wordpress on the server has been done. The image upload functionality everytime gives
    error below from day 1 of installation ! Please let me know how to resolve it !

    " Unable to create directory /home/wwwmomt/public_html/wp-content/uploads/2007/09. Is its parent directory writable by the server? "

  16. lunabyte
    Member
    Posted 16 years ago #

    I believe you are on the wrong forums.

    WordPress is located over here.

  17. andrea_r
    Moderator
    Posted 16 years ago #

    @cburell - did you get anyone to help you?

  18. dieselboy
    Member
    Posted 16 years ago #

    I have got the same problem since they installed PHP 5.2 on the server. When the /wp-content dir is set to 777 you can upload files, but you cannot access them. There is also the same header error in the error logs. When set to 755 images can be accessed, but you cannot upload any files, nor create directories. The support team said that 755 should be sufficient to upload files and create directories, but I noticed something else - you can't create subdirectories even through FTP:

    Command:	CWD /public_html/wp-content/blogs.dir/
    Response:	250 OK. Current directory is /public_html/wp-content/blogs.dir
    
    Command:	MKD TEST
    Response:	550 Can't create directory: Permission denied

    I don't know if it has to do something with the DOT charecter in the directory name... In ANY other folder i can create a subfolder, but not in /wp-content/blogs.dir .

    All folders are 755 including wp-content and /wp-content/blogs.dir .

    Please help!

  19. dieselboy
    Member
    Posted 16 years ago #

    FIXED:

    A lousy fix...

    Here is the solution:
    Since you can't delete the blogs.dir directory, you can't set any other permissions the only thing you can do is to create a new one - simply copy all the the stuff from /public_html/wp-content/blogs.dir/ to a local dir. Then rename/move /public_html/wp-content/blogs.dir/ to anything else, bla-bla for instance. Since you cannot deleted the directery you delete all of its content and just leave it empty. Although empty you cannot delete it (shoot me i tried ls -a -l and still got an empty dir ?! ).
    Then you create a new directory - /public_html/wp-content/blogs.dir/ and put the old stuff inside.

    Uploading and accessing work fine after this procedure.

  20. lilaussieprem
    Member
    Posted 16 years ago #

    Thanks so much for that dieselboy. Your fix worked perfectly for my members' blogs/images.

  21. camner
    Member
    Posted 15 years ago #

    This solution (to rename the folder 'blogs.dir') did not work for me. However, through more searching I came across this thread http://mu.wordpress.org/forums/topic.php?id=9077 that led to a solution that worked for me.

About this Topic