• Resolved unklee

    (@unklee)


    I have a WordPress self-hosted blog which I am currently using to try some things out. But when I try to upload graphics using the WordPress media upload, the file appears to upload, but generally I can’t actually see it or use it. (In one case, I can see it, I don’t know why the difference.)

    The blog is at http://http://home.exetel.com.au/h2bh, I am using WP 4.3, Sela theme, but I had similar problems with Penscratch theme, so I don’t think it is a theme issue.

    I can upload files by ftp, no worries. Sometimes I can see them in the media page, sometimes I cannot. But even when I can see them in the uploads folder, I cannot seem to insert them manually on the page – the page just shows a question mark- though I can select it as a featured image and then it displays.

    The graphic file permissions vary, some are 604, some are 644, I don’t know why the difference. One I uploaded by ftp was 604, the other 644. Ditto the ones I tried to upload via the WordPress media page – the names and permissions (again some 604, some 644) appear in the ftp window and the media page, but I can’t see the picture or use it.

    3. Most curiously, when I tried, twice, to upload a small file (balloon.gif, 4 kb), it also loaded a 10b file named balloon-150×150.gif (suggesting something wrong with the WordPress loader) and also got this error message each time (which sounds like a server problem):

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, hosting@exetel.com.au and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Apache Server at home.exetel.com.au Port 80

    Some symptoms seem like a WordPress problem and some like a server problem. I am also asking my ISP for help. Does anyone have any thoughts please?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    Have you assigned the correct user rights on the server?

    For example, if your website files are located in the following folder on your server: /websites/www/ or /var/www/, then you must ensure that WordPress can access those folders. This is generally done by giving the right access to the www-data user (may vary depending on your server setup).
    Without that, WordPress can neither write and in the worst case may not even be able to read the files.

    Hope this helps.

    Thread Starter unklee

    (@unklee)

    Hi, thanks for that. It sounds like it could be the problem. I understand permissions and how to change them for individual files and folders, but I don’t understand how to apply what you have just said. Can you point me to somewhere that explains how to ensure WordPress has access to the necessary folders please? (I can always Google, but if you have a good reference, that would help.) Thanks.

    Generally, you need apache/nginx (www-data) and you (www-data group) to write (and read) in /var/www/example.com/, so

    sudo chown -R www-data:www-data /var/www/example.com/
    sudo chmod -R 770 /var/www/example.com/

    This should (hopefully) do the trick.

    Use at your own risk though – particularly if www-data is not the correct user and or group.

    Thread Starter unklee

    (@unklee)

    Hi kunstwerck,

    Thanks for your interest and help. It may be that I still need to do what you have said, but I asked the support from my ISP, and got this message:

    upon checking with our L2 engineers you are seems to be having the following error,

    Permission denied: /home/freeweb/web/h2bh/public_html/wp-content/cache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable,

    Suggestion for the problem is to make the file readable or create a new file and try.

    I assume from this they think it is not their problem, but a problem with my WordPress install, specifically the .htaccess file. That file had 604 permissions so I changed that to 705, but that made no difference.

    Any further ideas from what you said before? Thanks.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    That file had 604 permissions so I changed that to 705, but that made no difference

    Try 644 for files, and 755 for directories. The numbers 604 and 705 make basically no sense for permissions.

    Thread Starter unklee

    (@unklee)

    I used 705 because it was the highest level of permissions I could see for this install. I changed to 644, but still the same. Perhaps it isn’t permissions?

    Thread Starter unklee

    (@unklee)

    Hi kunstwerck and Samuel,

    Thanks for your help. Unfortunately I’m still having the same problems.

    I tried increasing the permission, eventually trying 777 (!) but it made no difference. So I asked support at my ISP, and got this reply:

    upon checking with our L2 engineers you are seems to be having the following error,

    Permission denied: /home/freeweb/web/h2bh/public_html/wp-content/cache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable,

    Suggestion for the problem is to make the file readable or create a new file and try.

    The file looks OK, and I don’t know what would make it unreadable apart from permissions. And what makes it more weird is that that isn’t the address of the .htaccess file, and in that location (wp-content/cache) there is only one (blank) file, and I wouldn’t expect that location to have anything relevant. I will try to get more info out of them, but does that make sense to either of you?

    Thanks.

    Thread Starter unklee

    (@unklee)

    Thanks again, but you can stop worrying. I was able to locate or reload (can’t remember which) a second .htaccess file, change the permissions, and now I can upload.

    So once again permissions were the key. Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problems uploading graphics’ is closed to new replies.