File plugin issue at localhost duplicate version of website

Hi, I'm working on a local duplicate version of my website artechilenoindependiente.cl, uploading files has no problem at online version, but at local version, after the upload the files doesn't get listed well, get broken image logo instead of thumb image and some text mixed, html it is:

<img src="<div id="view-file/icon/default">http://localhost/achindepe/sactual-elgg1.7/mod/file/graphics/icons/general.gif</div>" 

Despite this, the files can be found at dada folder (with wrong date).

I followed this guide to duplicate my website: 
http://learn.elgg.org/es/latest/admin/duplicate-installation.html

The version is elgg 1.7

Any help will be appreciated.

  • If you are sure that you correctly followed the instructions on duplication of an installation (especially updating the database entries), then it's possibly an issue of the timezone on localhost not being the same as on the server of your website or not configured on localhost at all (http://learn.elgg.org/en/1.10/appendix/faqs.html?highlight=images#no-images). On localhost you could configure the php config variable in php.ini (with the same timezone selected as on your site's server). Alternatively, you can also set the timezone in Elgg's .htaccess in the <IfModule mod_php5.c> block, e.g add the line

    php_value date.timezone 'UTC'

    within this block (or whatever is the correct timezone, see http://php.net/manual/en/timezones.php).

    If it's not the timezone, it might be a permission issue with the files within the data directory or the owner and/or group of the files and directories within the data directory are wrong.

  • Thanks for your answer, I configured the timezone but the problem is still there, the files are saved with right date at database but in a wrong folder ( named "2007/11/05/21464").

    Thanks for your help. 

  • Have you configured the timezone on localhost to be the same timezone used on your site's server?

    How have you configured the timezone? Are you sure that the timezone you've configured is used? You could check with phpinfo by creating a script with content

    <?php
      phpinfo();
    ?>

    and placing it in the root folder of your Elgg installation on localhost. Then call it with http://url_of_site_on_localhost/script_name.php. You'll see the time and timezone in the output of phpinfo().

  • Default timezone, date.timezone local and master are "UTC".
    The name of the folder "2007..." it's ok, I was confused, that name it's the date of the user creation not the file.

    The problem I have detected now is that when the file is saved, the thumbs aren't created (smallthumb, largethumb and thumb), data folder has 755 permissions, but It doesn't seems to be that the problem. I keep searching.

    Thanks for your answer.

  • I thought you would know that the data directory structure for Elgg 1.7 is based on join date when you mentioned that the files are saved with the wrong date. That's why the timezone is important because a switch of the timezone results in the user's data not getting found correctly.

    If the thumbnails are not created, the problem lies somewhere else. Is it only with image entries that the entries have errors - can you download for example an uploaded pdf or textfile correctly? If the problem is only with images, the GD php extension is probably not installed or enabled on localhost. Or the post_max_size value and/or memory_limit is set too small in Elgg's htaccess.

    If other type of files also have problems it could be a permission issue with the data directory. With permissions 755 it's important that the data directory (and everything in it) has the Apache user (e.g. "wwwrun") as owner and the group should be set to the Apache user's default group (e.g. "www"). Owner and group might be different on your localhost installation, so you would have to set the appropriate owner and group used on localhost. Or you could set permissions to 777.

  • Problem solved! It was the gd library, It wasn't installed.

    Thank you very much for your help!

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking