Support » Fixing WordPress » media upload problem (permission denied in /includes/file.php on line 348)

  • I upgraded to WP version 3.3 and tried uploading pics with the new and old uploader. but get this:
    Warning: copy(/home/admin/domains/howtovideos.nl/public_html/wp-content/uploads/2011/12/Picture-12.jpg) [function.copy]: failed to open stream: Permission denied in /home/admin/domains/howtovideos.nl/public_html/wp-admin/includes/file.php on line 348

    permissions for upload directory and down and 755

    anyone got an idea, couldnt find the issue in the masterlist.

    thanks!

Viewing 15 replies - 1 through 15 (of 19 total)
  • Same here. I had similar problem before and I fixed it somehow by changing upload directory folder name. But this is wrong to do cus you will have all previous images lost from the site.

    Using Arras theme, WP 3.3

    same problem here too. is already a fix available without changing the name of folder “uploads”?

    Thread Starter m.p.van.velzen

    (@mpvanvelzen)

    Maybe some of the wordpress people could react to this? since it happens since the upgrade to 3.3 and was working great before.

    Were there any changes to what process executes the uploading with the 3.3 upgrade? that could explain the difference in permissions.

    Any update on this? I saw others suggest changing the upload folder permissions to 777 fixed it, but I tried that and the problem persists. The odd thing is, I can upload images via the Media section of the Admin panel, but not from the Edit Post page.

    Hi everyone here,
    Currently I only have 14 nos. low res image in the media library. This error came up when I tried to upload a new one.

    Fatal error: Out of memory (allocated 68681728) (tried to allocate 1024 bytes) in /home/kelly/public_html/wp-includes/media.php on line 1010

    Does anyone know what it means? Please help…Thanks.

    @kellypeterson, that’s a totally different problem, please start a new thread.

    Thanks Mike.

    Hi, I lived same problem. I’ve just changed a line and it worked.
    Open the file below
    /home/admin/domains/YOUR WEB SITE/public_html/wp-admin/includes/file.php
    Go line 348
    It’s like that
    copy( $tmp_file, $new_file);

    I changed new_file to filename 🙂
    copy( $tmp_file, $filename );

    I tried that, didn’t work for me. Any news on another solution? I’m just starting a website, can’t use any custom pictures like this.

    I had the same problem and found this somewhere and it worked for me:

    Got to Settings > Media
    And then uncheck “Organize my uploads into month- and year-based folders”

    Cheers!

    Thanks, will save this solution. It works for me to change permission to 777.

    Has anyone sorted out this issue? I’ve checked all of my permissions and done a load of troubleshooting and still no love.

    I used the same work-around that @morigirth posted (2 posts before yours).

    Thank you Mike. That didn’t work for me, either.

    It turns out that my php handler was set to one that didn’t play nice with this function. Here’s what my server guy said:

    We normally recommend switching your PHP handler to either FCGI or suPHP. Both of these are going to work as they will make Apache run as the cPanel user and thus get rid of the permission issues. FCGI will allow you to also run opcode caching software like APC. The only downfall is that FCGI uses more memory then what DSO(your current PHP Handler) uses. suPHP will not allow you to run opcode caching and will not use more memory however, it does use more CPU then any of the other PHP handlers. It has been around longer then FCGI so more people are familiar with it as well. It is going to depend on your preference as to what you want to switch to. Do you want to use more memory or more CPU?

    We switched it to suPHP and it seems to be working ok now.

    (also posted this in my own forum post)

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘media upload problem (permission denied in /includes/file.php on line 348)’ is closed to new replies.