The MU forums have moved to WordPress.org

Image upload error (18 posts)

  1. 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? "

    Chmod 750

  2. lunabyte
    Member
    Posted 16 years ago #

    "Unable to create directory"

    It's a permissions problem.

    I'll take a stab that you have cPanel. If so, you'll have to make it 777, not 750.

  3. anchal27
    Member
    Posted 16 years ago #

    Many Thanks for response.

    I have changed the permission of public_html from 750 to 777 then the following erorr appears

    The uploaded file could not be moved to /home/wwwmomt/public_html/wp-content/uploads/2007/09.
    Warning: Cannot modify header information - headers already sent by (output started at /home/wwwmomt/public_html/wp-admin/admin-functions.php:1965) in /home/wwwmomt/public_html/wp-includes/functions.php on line 1348

    Let me know the solution to this problem.

    Thanks
    Anchal

  4. ekusteve
    Member
    Posted 16 years ago #

    anchal27...I don't know the solution to the problem you are experiencing, but I can tell you the solution is NOT changing public_html to 777...you are just asking for problems if you do that.

    You should leave public_html set to 750 and, if you have a properly configured server with proper user and group set-up, then there is no reason to have any directory in mu set higher than 755.

    Steve

  5. lunabyte
    Member
    Posted 16 years ago #

    If they're hosted on a cPanel server, then wp-content will need to be 777.

    Thank cPanel for that. Those paths above are quite typical for cPanel, so unfortunately if that is the case, then the user doesn't have control of that.

    But, no, public_html should absolutely not be 777. It should be 755.

    "/home/wwwmomt/public_html/wp-content/uploads/2007/09."

    Wordpress MU does not contain such a path.

    You may want to search through the WP forums, which are over here.

  6. ekusteve
    Member
    Posted 16 years ago #

    If they're hosted on a cPanel server, then wp-content will need to be 777.

    I've never heard of a "cPanel server", but on a server with Cpanel software installed, Not true...I run Cpanel on my server and manage my mu install using it and I have no 777 directories...wp-content and all subdirectories are 755...public_html is 750 and all directories inside mu are 755.

    I've installed mu for others using Cpanel on a shared host (Bluehost for example) with the same settings.

    I host over 20 Cpanel accounts on my dedicated server running lots of different application and have never (at least not yet) needed to set a directory to 777.

    Steve

  7. lunabyte
    Member
    Posted 16 years ago #

    If there are certain things in place, yes. However, those particular hosts are few and far between. While unfortunate, they're certainly out there, and not in the minority.

    I never said it wasn't possible, for the record.

  8. anchal27
    Member
    Posted 16 years ago #

    Hi,

    Thanks again for response ! But the problem persists. I have changed the permissions as suggested by Steve.

    The following error appears
    The uploaded file could not be moved to /home/wwwmomt/public_html/wp-content/uploads/2007/09.
    Warning: Cannot modify header information - headers already sent by (output started at /home/wwwmomt/public_html/wp-admin/admin-functions.php:1965) in /home/wwwmomt/public_html/wp-includes/functions.php on line 1348

    The above occurs when i select a file. As I click on upload I get above error. I have my site hosted with www. 34sp.com .

    Any other info you require . Please let me know.

    Thanks
    Anchal
    anc_j@yahoo.com

  9. andrea_r
    Moderator
    Posted 16 years ago #

    "Cannot modify header information - headers already sent by"
    this usually means hter eis whitespace at the end of one or both of the files mentioned. Please go double-check the files on the server and remove any spaces after the last ?>

  10. anjovis
    Member
    Posted 16 years ago #

    "Cannot modify header information - headers already sent by"

    occurring with this particular setup is because there is the error output from the file upload functionality, not because of any whitespace.

    So this headers aleady sent issue is just a byproduct of your non-working file upload.

    (I'm having file upload problems as well, even though I have set permissions correctly... still looking into it)

  11. billybrasov
    Member
    Posted 16 years ago #

    I had the same problem when I try it to upload a photo on a new post:
    El archivo subido no se pudo mover a /home/username/public_html/wp-content/uploads/2007/10.
    Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/wp-admin/admin-functions.php:1965) in /home/username/public_html/wp-includes/functions.php on line 1348

    I have changed the permission from 755 to 777 of /public_html/wp-content/uploads/2007/10 and now is ok. (10 is the folder where I wanted to upload the photo)

  12. lunabyte
    Member
    Posted 16 years ago #

    wp-content/uploads/2007/

    That's a WordPress path, not an MU path.

    Nice to know you corrected your problem, but WordPress is over here.

  13. mvidac
    Member
    Posted 16 years ago #

    Our blog has lost the ability to upload images. It was working fine and then one day not ... now we get this:

    The uploaded file could not be moved to /usr/www/work/php-apps/mu.wordpress/wordpress-mu-1.2.5a/wp-content/blogs.dir/1/files//2007/11.

    Refuses to go any further. You can ftp it directly and put in the link and that's fine but not thru the inline editor. I'm at the end of my rope with this. We have had nothing but problems. This one beats all because it was working!

    Also, if you choose 'Browse all' they show up as blank boxes with their filenames on them. Clicking them just takes you to a page with their name again. No image.

    My host told me to include this in my post:

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    #RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+)/files/(.*) wp-content/blogs.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]
    RewriteRule . index.php [L]
    ~

    -- You see the rewriterule #3 that's what i put, the one above it commented out with the # is what I replaced....

    Any help (or a nice long rope) would be appreciated.

  14. theapparatus
    Member
    Posted 16 years ago #

    Just for reference, in your readme.txt file included with your download is a link to a debugging page. That information is what you need to include when trying to work out issues.

    And it's also a good idea to search first when you have an error.

    First, please take a second, read the debugging page I linked to. Then please check your file permissions to make sure the directories are writable by the server. Also make sure the blogs.dir subdirectory is owned by the webserver. Also check your webserver's error logs for any additonal error messages.

    Good luck

  15. andrea_r
    Moderator
    Posted 16 years ago #

    Actually, I have been having the same issue. Didn't touch a thing in the code either. It just stopped working.

    I did track down that the image gets uploaded, but when it returns to show it, it dies.

    I figured it was a server issue, but if someone else is having the same problem, maybe we can figure out what's up.

  16. dieselboy
    Member
    Posted 16 years ago #

    I recently had the same problem on my WPMU site. The issue was that the administrators had installed PHP 5.2 and the whole rights in directories screwed up. Instead of using CHMOD 777 you should use 755. There was I thread that I started earlier and found a solution to the problem - it was not related to WPMU at all - just an unknown PHP/Apache issue with the blogs.dir directory.

    see http://mu.wordpress.org/forums/topic.php?id=3711&page&replies=19 this thread.

  17. petti
    Member
    Posted 15 years ago #

    If using cpanel server , you should delete or rename the blogs.dir folder to something else ( for ex : blogs.dir2 ! )
    then create new folder manually ( blogs.dir )and set 777 permissions .

    Then problem will be fix automatically :) .

  18. tdjcbe
    Member
    Posted 15 years ago #

    As noted in your other threads, that's a security risk and shouldn't be done.

About this Topic