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?

  • I changed the entire site.

    From  /home/inton634/public_html/redeportaldaluz.com to /home/inton634/redeportaldaluz.com way

    I set the domain and the site is running

    but still pictures work

  • Now the log changed

    PHP WARNING: 2015-07-27 23:39:31 (CDT): "mkdir(): Permission denied" in file /home/inton634/redeportaldaluz.com/engine/classes/ElggFileCache.php (line 66)


    WARNING: Couldn't create directory: /redeportaldaluz.com/arq/1/61/profile
    [27-Jul-2015 23:39:32 America/Chicago] PHP WARNING: 2015-07-27 23:39:32 (CDT): "fwrite() expects parameter 1 to be resource, boolean given" in file /home/inton634/redeportaldaluz.com/engine/classes/ElggDiskFilestore.php (line 113)

     

    Folders are with full write access

  • Not sure what to tell you, it's most definitely either the path or the permissions that are wrong

  • I wonder if there's a misunderstanding on your side about the difference between install directory (where you put the Elgg files into) and the data directory (where later users's files like profile images get saved).

    It wouldn't have been necessary to move the whole install directory. And in case you changed the permission of the files and directories within the install directory to 777 this is surely wrong (security risk). In case you changed the permissions of the install directory (/home/inton634/redeportaldaluz.com) and its content, you should restore the original file and directory permissions urgently.

    The data directy is NOT the install directory. It's a separate directory you need to create yourself and then provide the full path to this directory either during the installation of Elgg or later enter the full path to this directory in the advanced site settings in the admin area of your site. This data directory that you can create for example at /home/inton634/data_directory_name needs to have sufficient read / write permissions to allow for the webserver to read from it and write to it. As it's not directly accessible from the Internet the risk of setting 777 permissions are low (and it should work with 777 permissions in any case if your server doesn't use open_basedir directive in the php config which would require some adjustments that you might not be able to do on a shared server unfortunately).

    In your case Elgg tries to create a directory within the data directory at /redeportaldaluz.com. This will NOT work because

    • it's not the full path to the data directory (starting from the root directory of the filesystem),
    • it seems like you tried to point to the install directory (/home/inton634/redeportaldaluz.com) instead of a separately created data directory anyway.

    Just create a new directory to be used as data directory in /home/inton634. Name it for example elgg_data_directory, change the permissions of this directory to 777 and then provide the full path to this directory in the advanced site settings, i.e. enter /home/inton634/elgg_data_directory/ in the corresponding input field.

  • I could, I created a folder for data, I configured the permissions and adjusted the configuration that was being reported starting from /redeportaldaluz and should be starting at /home/inton634/

    Muito obrigado

    • iionly
    • Matt Beckett
    • Steve Clay
    • Toby
    • RvR