Images do not work on the site

For my test I found that the avatars would be in the "/arq/1", checked the folder permissions and allow writing.

Does anyone have an idea to solve this?

  • Check your error_log for warnings/errors.

  • check my postings i had same issue but resolved now!

  • Steve Clay

    The log shows this error several times

    [22-Jul-2015 18:14:00 America/Chicago] PHP WARNING: 2015-07-22 18:14:00 (CDT): "mkdir(): Permission denied" in file /home/inton634/public_html/redeportaldaluz.com/engine/classes/ElggFileCache.php (line 66)

     

     

    shows after this another mistake several times

    [22-Jul-2015 18:14:01 America/Chicago] PHP WARNING: 2015-07-22 18:14:01 (CDT): "fopen(/public_html/redeportaldaluz.com/system_cache/view_locations): failed to open stream: No such file or directory" in file /home/inton634/public_html/redeportaldaluz.com/engine/classes/ElggFileCache.php (line 74)

     

     

    then displays these errors

    [22-Jul-2015 18:14:01 America/Chicago] PHP WARNING: 2015-07-22 18:14:01 (CDT): "fwrite() expects parameter 1 to be resource, boolean given" in file /home/inton634/public_html/redeportaldaluz.com/engine/classes/ElggDiskFilestore.php (line 113)
    [22-Jul-2015 18:14:01 America/Chicago] PHP WARNING: 2015-07-22 18:14:01 (CDT): "fclose() expects parameter 1 to be resource, boolean given" in file /home/inton634/public_html/redeportaldaluz.com/engine/classes/ElggDiskFilestore.php (line 141)

     

    I put these files writable, but continue errors

     

    Toby

    I did not find that topic has information

  • @Arnaldo Did you create a data folder? What about the permissions in there?

  • RvR

    The folder "arq" this with all permissions.

    The folder "1" in it, also this with all permissions.

    According to the log file the site would create the folder "61" inside the folder "1" and not created.

    So I did a test by creating and by setting all permissions and failed.

     

    [23-Jul-2015 13:11:20 America/Chicago] PHP WARNING: 2015-07-23 13:11:20 (CDT): "mkdir(): Permission denied" in file /home/inton634/public_html/redeportaldaluz.com/engine/classes/ElggFileCache.php (line 66)
    [23-Jul-2015 13:11:20 America/Chicago] WARNING: Couldn't create directory: /public_html/redeportaldaluz.com/1/61/profile

    Once created the "profile" folder within "61" and I configured all permissions but it did not work well.

     

    Here are the first few lines of the log

  • /public_html/redeportaldaluz.com/1/61/profile

    Seeing this path I think you have entered the wrong path for the data directory during installing your site - either by mistake or intentionally. As the install instructions say, the data directory should not be within the document root path (in your case within public_html). The reason is that this is a security risk.

    So, I would suggest to create your data directory at

    /home/inton634/data_directory

    before doing anything else (you also need to update the path to the data directory in the advanced site settings in the admin section of your site to "/home/inton634/data_directory/" then).

    At the moment the webserver can't create the subdirectory "profile" in the data directory because the permissions are wrong. You need to give read/write permissions for the data directory not only for your own accout because the webserver runs under another account. So, create the data directory at "/home/inton634/data_directory" and then give it 777 permissions (read/write for yourself, the group your user account belongs to and others - as the webserver will belong to others). The other options (if you would have root access on the server) is to change the owner of the data directory to the account the webserver runs at.

     

  • The reason to be in the public_html is because there are more sites hosted on this hosting.

    But I will try to follow your advice. See if I can do.

  • Other sites won't even notice the data directory. But it must be outside public_html for security reasons because you don't want the data saved in the data directory to be directly accessible over the Internet but the access restricted and handled by Elgg.

  • So it's impossible to run Elgg in a shared hosting?

    How should I proceed?

  • It's certainly possible, just create a data directory for it at /home/inton634/redeportaldluz_data/ or something