Preview not working/Problems with GraphicsMagick

344 views
Skip to first unread message

ad...@teepeepro.co

unread,
Oct 21, 2015, 4:48:29 AM10/21/15
to ResourceSpace

Greetings all, 

At first I thought it was just not working for TIFF files, but it seems my preview function is not working at all (on jpeg or TIFF) ever since I upgraded to r7095. I get the standard placeholder image, but all the images download fine. I tried to recreate a preview for the images in question, but I instead got the following error:

Sorry, an error has occurred.

Please go back and try something else.

You can check your installation configuration.

/var/www/resourcespace/include/image_processing.php line 939: Undefined index: source_extensions



Any ideas on how this could be happening? How did my GraphicsMagick path get messed up? Any hints on how to point the image_processing.php to the correct path?

I don't see any errors in the debug log as well...

Here is the debug log when I try to re-create a preview in RS (create preview is 8th line from the bottom, I think):

2015-10-20 19:39:06 SQL: SELECT name,enabled_groups, config, config_json FROM plugins WHERE inst_version>=0 ORDER BY priority
2015-10-20 19:39:06 SQL: select *,mapzoom from resource where ref='1701'
2015-10-20 19:39:06 SQL: select config_options value from resource_type where ref='1'
2015-10-20 19:39:06 SQL: SELECT name FROM plugins WHERE inst_version>=0 AND name like'col-%' ORDER BY priority
2015-10-20 19:39:06 SQL: select file_path value from resource where ref='1701'
2015-10-20 19:39:06 SQL: select * from resource_type  order by order_by,ref
2015-10-20 19:39:06 SQL: select resource_type value from resource where ref='1701'
2015-10-20 19:39:06 use perms:
2015-10-20 19:39:06 SQL: select d.value,d.resource_type_field,f.*,f.required frequired,f.ref fref from resource_type_field f left join (select * from resource_data where resource='1701') d on d.resource_type_field=f.ref and d.resource='1701' where ( f.resource_type=0 or f.resource_type=999 or f.resource_type='1') group by f.ref order by f.resource_type,f.order_by,f.ref
2015-10-20 19:39:06 SQL: select ref value from resource_type
2015-10-20 19:39:06 fieldclient=,ONGMundoNovo
2015-10-20 19:39:06 fieldTitle=ONG Mundo Novo Fotos
2015-10-20 19:39:06 fieldOriginal filename=ONGNovoMundo104.tif
2015-10-20 19:39:06 fieldKeywords=ONG, crianças, escola
2015-10-20 19:39:06 fieldCaption=
2015-10-20 19:39:06 fieldExtracted text=
2015-10-20 19:39:06 fieldCountry=,Brazil
2015-10-20 19:39:06 fieldNamed person(s)=
2015-10-20 19:39:06 fieldDate=2015-09-22 16:57
2015-10-20 19:39:06 fieldCredit=TP
2015-10-20 19:39:06 fieldNotes=
2015-10-20 19:39:06 fieldCamera make / model=
2015-10-20 19:39:06 fieldSource=,Digital Camera
2015-10-20 19:39:06 SQL: select name value from resource_type where ref='1'
2015-10-20 19:39:06 SQL: select g.ref,g.name,g.permissions,c.access from usergroup g left outer join resource_custom_access c on g.ref=c.usergroup and c.resource='1701'  group by g.ref order by (g.permissions like '%v%') desc,g.name
2015-10-20 19:39:06 SQL: select related value from resource_related where resource='1701' union select resource value from resource_related where related='1701'
2015-10-20 19:39:10 SQL: SELECT name,enabled_groups,config,config_json FROM plugins WHERE inst_version>=0 order by priority
2015-10-20 19:39:10 SQL: select language,name,text from site_text where (page='edit' or page='all') and (specific_to_group is null or specific_to_group=0)
2015-10-20 19:39:10 SQL:
 SELECT
`name`,
       
`text`,
       
`page`,
       
`language`, specific_to_group
  FROM site_text
 WHERE
(`language` = "en-US" OR `language` = "en")
   AND
(page = 'edit' OR page = 'all' OR page = '' )  #pagefilter
   AND
(specific_to_group IS NULL OR specific_to_group = 0);
 
2015-10-20 19:39:10 SQL: select u.ref, u.username, g.permissions, g.fixed_theme, g.parent, u.usergroup, u.current_collection, u.last_active, timestampdiff(second,u.last_active,now()) idle_seconds,u.email, u.password, u.fullname, g.search_filter, g.edit_filter, g.ip_restrict ip_restrict_group, g.name groupname, u.ip_restrict ip_restrict_user, resource_defaults, u.password_last_change,g.config_options,g.request_mode, g.derestrict_filter, u.hidden_collections from user u,usergroup g where u.usergroup=g.ref and u.session='2409cc84a1935be234f04cd13ee52710' and u.approved=1 and (u.account_expires is null or u.account_expires='0000-00-00 00:00:00' or u.account_expires>now())
2015-10-20 19:39:10 SQL: SELECT value FROM sysvars WHERE name='debug_override_user'
2015-10-20 19:39:10 SQL: SELECT value FROM sysvars WHERE name='debug_override_expires'
2015-10-20 19:39:10 SQL: select ref value from collection where ref='41'
2015-10-20 19:39:10 SQL: update user set lang='en-US', last_active=now(),logged_in=1,last_ip='XXX.XXX.XXX.XXX',last_browser='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36',accepted_terms=1 where ref='1'
2015-10-20 19:39:10 SQL:
 SELECT
`name`,
       
`text`,
       
`page`
  FROM site_text
 WHERE language
= 'en-US'
   AND
(page = 'edit' OR page = 'all' OR page = '' ) #pagefilter
   AND specific_to_group
= '3';
 
2015-10-20 19:39:10 SQL: SELECT name,enabled_groups, config, config_json FROM plugins WHERE inst_version>=0 ORDER BY priority
2015-10-20 19:39:10 SQL: select *,mapzoom from resource where ref='1701'
2015-10-20 19:39:10 SQL: select config_options value from resource_type where ref='1'
2015-10-20 19:39:10 SQL: update resource set preview_attempts=0 WHERE ref='1701'
2015-10-20 19:39:10 create_previews(ref=1701,thumbonly=,extension=tif,previewonly=,previewbased=,alternative=-1,ingested=)
2015-10-20 19:39:10 SQL: select file_extension value from resource where ref=1701
2015-10-20 19:39:10 create_previews - generate checksum for 1701
2015-10-20 19:39:10 SQL: update resource set file_checksum='' where ref='1701'
2015-10-20 19:39:10 SQL: update resource set preview_tweaks = '0|1' where ref = '1701'
2015-10-20 19:39:10 SQL: select file_path value from resource where ref='1701'
2015-10-20 19:39:10 File source is /var/www/resourcespace/include/../filestore/1/7/0/1_6443cf3fbd19429/1701_92c85adeac8d3ca.tif



Here are the system specs: 

ResourceSpace versionSubversion r7095
PHP version5.3.10-1ubuntu3.19  (config: /etc/php5/apache2/php.ini)OK
MySQL version5.5.44-0ubuntu0.12.04.1  (client-encoding: latin1)OK
GD version2.0OK
PHP.INI value for 'memory_limit'1000MOK
PHP.INI value for 'post_max_size'1000MOK
PHP.INI value for 'upload_max_filesize'10000MOK
Write access to /var/www/resourcespace/include/../filestoreOK
Write access to /pluginsOK
Blocked browsing of 'filestore' directoryOK
Large file support (64 bit platform)OK
GraphicsMagickGraphicsMagick 1.3.12 2010-03-08 Q8 http://www.GraphicsMagick.org/OK
FFmpegffmpeg 0.8.17-4:0.8.17-0ubuntu0.12.04.1OK
GhostscriptGPL Ghostscript 9.05 (2012-02-08)OK
EXIF extensionOK
ExifTool8.60OK
Archiver utilityOK
SVN PHP extension installed (php5-svn)FAIL
php-imapOK
php-curlOK

kev neal

unread,
Oct 21, 2015, 6:40:14 AM10/21/15
to ResourceSpace
same here, though I am able to "retry thumbnail creation" from the edit page of the image, does that not work for you either?
...

Allison M Stec

unread,
Oct 21, 2015, 8:01:03 AM10/21/15
to resour...@googlegroups.com
The error message relates to missing parts in your config.php file. When you want to create $image_alternatives automatically, you need to have $image_alternative[#]['source_extension'] set. It seems your install is missing that setting for at least one alternative.

Alternatives are created before the general previews, so the code is throwing an error before it even gets to making your previews.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
ResourceSpace Developer
Reseller of Colorhythm's Prismpoint Portal DAM

ad...@teepeepro.co

unread,
Oct 28, 2015, 1:05:06 PM10/28/15
to ResourceSpace
Thanks Allison for the reply and the help.

Wouldn't these image alternatives be automatically built into the preview creator? Why do I have to define this in the config file? 

Im a little fuzzy how the image_alternative works - from what I see in the config.default file, it seems like you have to define what you want the image_alternatives to be. I just want the previews to show up :-)

Taylor
...

Allison M Stec

unread,
Oct 28, 2015, 1:53:04 PM10/28/15
to resour...@googlegroups.com
There are two types of previews being talked about here: application required previews (the ones you see in search results and on the view page) and custom previews (settings found in image_alternative). You're right in thinking that the previews you're trying to see should be created automatically. However, your error suggests that your configuration file includes settings for custom previews as well. When previews are created (either on upload or by request) RS will try to make custom previews first.

As I mentioned before, the error you posted when recreating previews suggest that you have settings for custom previews. Please check and make sure any $image_alternatives lines are commented out of your configuration file. This should stop the error message when you try to recreate previews.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ad...@teepeepro.co

unread,
Oct 28, 2015, 3:05:30 PM10/28/15
to ResourceSpace
Excellent explanation, thank you - and good to know how RS looks at making the alternates first. 

I did look at my config.php file and found the culprit to the error - an additional $image_alternative[#]['icc']=true; that I had included to solve this problem, as I saw it earlier as a possible solution from the forms. I have now removed it and know what it means :-) - thanks

But the preview problem still exists! I tried to recreate the preview now, but the "please wait" prompt appears for a few seconds, then nothing happens. No error message. I have included the debug log from where I selected the image and tried to do the "recreate preview" function. The only thing I see that seems odd is that the line:
SQL: select type value from resource_type_field where ref=8
seems to repeat. Could this shine light on the issue?

debug log:

2015-10-28 18:56:43 SQL: 
SELECT `name`,
      `text`,
      `page` 
 FROM site_text 
WHERE language = 'en-US'
  AND (page = 'collections' OR page = 'all' OR page = '' ) #pagefilter
  AND specific_to_group = '3';
2015-10-28 18:56:43 SQL: SELECT name,enabled_groups, config, config_json FROM plugins WHERE inst_version>=0 ORDER BY priority
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select * from collection_savedsearch where collection='41' order by created
2015-10-28 18:56:43 search=!collection41  -1 restypes= archive=0 daylimit=
2015-10-28 18:56:43 SQL: select ref as value from resource_type_field where keywords_index=1
2015-10-28 18:56:43 SQL: select ref from resource_type_field where keywords_index=1 and length(name)>0
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select user value from user_collection where collection='41'
2015-10-28 18:56:43 SQL: select distinct c.date_added,c.comment,c.purchase_size,c.purchase_complete,r.hit_count score,length(c.comment) commentset, r.ref, r.resource_type, r.has_image, r.is_transcoding, r.hit_count, r.creation_date, r.rating, r.user_rating, r.user_rating_count, r.user_rating_total, r.file_extension, r.preview_extension, r.image_red, r.image_green, r.image_blue, r.thumb_width, r.thumb_height, r.archive, r.access, r.colour_key, r.created_by, r.file_modified, r.file_checksum, r.request_count, r.new_hit_count, r.expiry_notification_sent, r.preview_tweaks, r.file_path ,null group_access, null user_access ,r.field12 ,r.field8 ,r.field3  from resource r  join collection_resource c on r.ref=c.resource   where c.collection='41' and r.ref>0 group by r.ref order by c.sortorder ASC, c.date_added DESC, r.ref DESC
2015-10-28 18:56:43 SQL: select * from (select c.*,u.username,u.fullname,count(r.resource) count from user u join collection c on u.ref=c.user and c.user='1' left outer join collection_resource r on c.ref=r.collection  where  (length(c.theme)=0 or c.theme is null)   group by c.ref
union
select c.*,u.username,u.fullname,count(r.resource) count from user_collection uc join collection c on uc.collection=c.ref and uc.user='1' and c.user<>'1' left outer join collection_resource r on c.ref=r.collection left join user u on c.user=u.ref  where  (length(c.theme)=0 or c.theme is null)  group by c.ref) clist  group by ref 
2015-10-28 18:56:43 SQL: select count(*) value from research_request where collection='41'
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select user value from user_collection where collection='41'
2015-10-28 18:56:43 collection session : 
2015-10-28 18:56:43 collection user : 1
2015-10-28 18:56:43 anonymous_login : 
2015-10-28 18:56:43 userref : 1
2015-10-28 18:56:43 username : admin
2015-10-28 18:56:43 anonymous_user_session_collection : TRUE
2015-10-28 18:56:43 search=!collection41  -1 restypes= archive=0 daylimit=
2015-10-28 18:56:43 SQL: select ref as value from resource_type_field where keywords_index=1
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select user value from user_collection where collection='41'
2015-10-28 18:56:43 SQL: select distinct c.date_added,c.comment,c.purchase_size,c.purchase_complete,r.hit_count score,length(c.comment) commentset, r.ref, r.resource_type, r.has_image, r.is_transcoding, r.hit_count, r.creation_date, r.rating, r.user_rating, r.user_rating_count, r.user_rating_total, r.file_extension, r.preview_extension, r.image_red, r.image_green, r.image_blue, r.thumb_width, r.thumb_height, r.archive, r.access, r.colour_key, r.created_by, r.file_modified, r.file_checksum, r.request_count, r.new_hit_count, r.expiry_notification_sent, r.preview_tweaks, r.file_path ,null group_access, null user_access ,r.field12 ,r.field8 ,r.field3  from resource r  join collection_resource c on r.ref=c.resource   where c.collection='41' and r.ref>0 group by r.ref order by c.sortorder ASC, c.date_added DESC, r.ref DESC
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select type value from resource_type_field where ref=8
2015-10-28 18:56:43 SQL: select count(*) value from research_request where collection='41'
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select user value from user_collection where collection='41'
2015-10-28 18:56:43 collection session : 
2015-10-28 18:56:43 collection user : 1
2015-10-28 18:56:43 anonymous_login : 
2015-10-28 18:56:43 userref : 1
2015-10-28 18:56:43 username : admin
2015-10-28 18:56:43 anonymous_user_session_collection : TRUE
2015-10-28 18:56:43 search=!collection41  -1 restypes= archive=0 daylimit=
2015-10-28 18:56:43 SQL: select ref as value from resource_type_field where keywords_index=1
2015-10-28 18:56:43 SQL: select c.*, c.theme2, c.theme3, c.keywords, u.fullname, u.username, c.home_page_publish, c.home_page_text, c.home_page_image,c.session_id from collection c left outer join user u on u.ref = c.user where c.ref = '41'
2015-10-28 18:56:43 SQL: select u.username value from user u,user_collection c where u.ref=c.user and c.collection='41' order by u.username
2015-10-28 18:56:43 SQL: select user value from user_collection where collection='41'
2015-10-28 18:56:43 SQL: select distinct c.date_added,c.comment,c.purchase_size,c.purchase_complete,r.hit_count score,length(c.comment) commentset, r.ref, r.resource_type, r.has_image, r.is_transcoding, r.hit_count, r.creation_date, r.rating, r.user_rating, r.user_rating_count, r.user_rating_total, r.file_extension, r.preview_extension, r.image_red, r.image_green, r.image_blue, r.thumb_width, r.thumb_height, r.archive, r.access, r.colour_key, r.created_by, r.file_modified, r.file_checksum, r.request_count, r.new_hit_count, r.expiry_notification_sent, r.preview_tweaks, r.file_path ,null group_access, null user_access ,r.field12 ,r.field8 ,r.field3  from resource r  join collection_resource c on r.ref=c.resource   where c.collection='41' and r.ref>0 group by r.ref order by c.sortorder ASC, c.date_added DESC, r.ref DESC


Thank you again!

Taylor

Allison M Stec

unread,
Oct 28, 2015, 3:18:34 PM10/28/15
to resour...@googlegroups.com
There's no sign of a preview being created at all now. Anytime a preview is attempted the log will have a line that start with "create_previews".

Do you happen to have "$enable_thumbnail_creation_on_upload=false;" in your config file?

ad...@teepeepro.co

unread,
Oct 28, 2015, 3:25:12 PM10/28/15
to ResourceSpace
Super strange... Nice to know that "create_previews" would appear.

I do not have that line in my config.php. Here is my config file as it is now, with sensitive information starred (**********) out. 

<?php
###############################
## ResourceSpace
## Local Configuration Script
###############################

# All custom settings should be entered in this file.
# Options may be copied from config.default.php and configured here.

# MySQL database settings
$mysql_server = 'localhost';
$mysql_username = '**********';
$mysql_password = '**********';
$mysql_db = 'r**********';

$mysql_bin_path = '/usr/bin';

# Base URL of the installation
$baseurl = '**********';

# Email settings
$email_from = '**********';
$email_notify = '**********';

$spider_password = '**********';
$scramble_key = '**********';

$api_scramble_key = '**********';

# Paths
$imagemagick_path = '/usr/bin';
$ghostscript_path = '/usr/bin';
$ffmpeg_path = '/usr/bin';
$exiftool_path = '/usr/bin';
$antiword_path = '/usr/bin';
$pdftotext_path = '/usr/bin';

$applicationname = '**********';
$ftp_server = 'my.ftp.server';
$ftp_username = 'my_username';
$ftp_password = 'my_password';
$ftp_defaultfolder = 'temp/';
$thumbs_display_fields = array(8,3);
$list_display_fields = array(8,3,12);
$sort_fields = array(12);

# Additional Options:

# Set $collection_download to true to enable download of collections as archives (e.g. zip files).
# The setting below overrides - if true - the $zipcommand.
# You also have to uncomment and set $collection_download_settings for it to work.
# (And don't forget to set $archiver_path etc. in the path section.)

$collection_download = true;

$archiver_path = '/usr/bin';
$archiver_executable = 'zip';
$archiver_listfile_argument = "-@ <";

$collection_download_settings[0]["name"] = 'ZIP';
$collection_download_settings[0]["extension"] = 'zip';
$collection_download_settings[0]["arguments"] = '-j';
$collection_download_settings[0]["mime"] = 'application/zip';

#Info on home page
$homeanim_folder="gfx/homeanim/myslides";

# Watermarking - generate watermark images for 'internal' (thumb/preview) images.
# Groups with the 'w' permission will see these watermarks when access is 'restricted'.
# Uncomment and set to the location of a watermark graphic.
# NOTE: only available when ImageMagick is installed.
# NOTE: if set, you must be sure watermarks are generated for all images; This can be done using pages/tools/update_previews.php?previewbased=true
# NOTE: also, if set, restricted external emails will recieve watermarked versions. Restricted mails inherit the permissions of the sender, but
# if watermarks are enabled, we must assume restricted access requires the equivalent of the "w" permission
$watermark="gfx/watermark.png";

$use_smtp=true;
# SMTP settings:
$smtp_secure='ssl'; # '', 'tls' or 'ssl'. For Gmail, 'tls' or 'ssl' is required.
$smtp_host='**********'; # Hostname, e.g. 'smtp.gmail.com'.
$smtp_port=**********; # Port number, e.g. 465 for Gmail using SSL.
$smtp_auth=true;
$smtp_username='**********';
$smtp_password='**********';

$use_phpmailer=true;
# Added below to assist in faulting zip downloading.
$exiftool_write=true;

#
# ------------------------ eCommerce Settings -----------------------------
#
# Pricing information for the e-commerce / basket request mode.
# Pricing is size based, so that the user can select the download size they require.
$pricing["scr"]=5;
$pricing["lpr"]=5;
$pricing["hpr"]=10; # (hpr is usually the original file download)
$currency_symbol="$";
$payment_address="**********"; // you must enable Instant Payment Notifications in your Paypal Account Settings.
$payment_currency="**********";
# Should the "Add to basket" function appear on the download sizes, so the size of the file required is selected earlier and stored in the basket? This means the total price can appear in the basket.
$basket_stores_size=true; 


# Slimheader improvement, made in version 7 plus.... 09/18/2015

$slimheader=true;
global $available_themes;$available_themes[]="slimcharcoal";

    $slideshow_big=true;
    $home_slideshow_width=1920;
    $home_slideshow_height=1080;

#header image:
$linkedheaderimgsrc = '/resourcespace/gfx/newheader.png';

# Log developer debug information to the debug log (filestore/tmp/debug.txt)?
# As the default location is world-readable it is recommended for live systems to change the location to somewhere outside of the web directory by setting $debug_log_location below
$debug_log=true;


Thank you!

Taylor
...

Allison M Stec

unread,
Oct 28, 2015, 3:31:02 PM10/28/15
to resour...@googlegroups.com
$enable_thumbnail_creation_on_upload is set to true by default, but I did notice that the edit page's recreate previews option is connected to this setting.

How are you attempting to recreate a preview? Are you testing with a single resource?

Could you try to empty your debug_log.txt file and try again?
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ad...@teepeepro.co

unread,
Oct 30, 2015, 12:34:37 PM10/30/15
to ResourceSpace
OK, flushed and deleted my debug.log file and put it in a better location on the server. 

On my next attempt, I actually saw the create_previews seemingly functioning, but I don't know much about SQL, so I will ask you to see if you know what is happening...


2015-10-30 16:24:58 SQL: 
SELECT `name`,
      `text`,
      `page` 
 FROM site_text 
WHERE language = 'en-US'
  AND (page = 'edit' OR page = 'all' OR page = '' ) #pagefilter
  AND specific_to_group = '3';
2015-10-30 16:24:58 SQL: SELECT name,enabled_groups, config, config_json FROM plugins WHERE inst_version>=0 ORDER BY priority
2015-10-30 16:24:58 SQL: select *,mapzoom from resource where ref='1702'
2015-10-30 16:24:58 SQL: select config_options value from resource_type where ref='1'
2015-10-30 16:24:58 SQL: update resource set preview_attempts=0 WHERE ref='1702'
2015-10-30 16:24:58 create_previews(ref=1702,thumbonly=,extension=tif,previewonly=,previewbased=,alternative=-1,ingested=)
2015-10-30 16:24:58 SQL: select file_extension value from resource where ref=1702
2015-10-30 16:24:58 create_previews - generate checksum for 1702
2015-10-30 16:24:58 SQL: update resource set file_checksum='' where ref='1702'
2015-10-30 16:24:58 SQL: update resource set preview_tweaks = '0|1' where ref = '1702'
2015-10-30 16:24:58 SQL: select file_path value from resource where ref='1702'
2015-10-30 16:24:58 File source is /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif
2015-10-30 16:24:58 SQL: update resource set has_image=0 where ref='1702'
2015-10-30 16:24:58 Starting preview preprocessing. File extension is tif.
2015-10-30 16:24:58 FFMPEG-VIDEO: ####################################################################
2015-10-30 16:24:58 FFMPEG-VIDEO: Start trying FFMPeg for video files -- resource ID 1702
2015-10-30 16:24:58 create_previews_using_im(ref=1702,thumbonly=,extension=tif,previewonly=,previewbased=,alternative=-1,ingested=)
2015-10-30 16:24:58 CLI command: '/usr/bin/identify' -format %wx%h '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0]
2015-10-30 16:24:58 SQL: select * from preview_size  order by width desc, height desc
2015-10-30 16:24:58 Contemplating hpr (sw=5760, tw=999999, sh=3840, th=999999, extension=tif)
2015-10-30 16:24:58 Generating preview size hpr to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702hpr_bab60e0f8cd3f2c.jpg
2015-10-30 16:24:58 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 999999x999999">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702hpr_bab60e0f8cd3f2c.jpg'
2015-10-30 16:24:59 Contemplating lpr (sw=5760, tw=2000, sh=3840, th=2000, extension=tif)
2015-10-30 16:24:59 Generating preview size lpr to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702lpr_1f613999346a8c9.jpg
2015-10-30 16:24:59 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 2000x2000">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702lpr_1f613999346a8c9.jpg'
2015-10-30 16:25:00 Contemplating scr (sw=5760, tw=1100, sh=3840, th=800, extension=tif)
2015-10-30 16:25:00 Generating preview size scr to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702scr_c2e761b995896a7.jpg
2015-10-30 16:25:00 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 1100x800">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702scr_c2e761b995896a7.jpg'
2015-10-30 16:25:00 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90 +matte -strip -colorspace RGB -resize 1100x800">" -tile '/var/www/resourcespace/include/../gfx/watermark.png' -draw "rectangle 0,0 1100,800" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702scr_wm_1fb20c30a200ebe.jpg'
2015-10-30 16:25:01 Contemplating pre (sw=5760, tw=350, sh=3840, th=350, extension=tif)
2015-10-30 16:25:01 Generating preview size pre to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702pre_cc3f4086f7912ee.jpg
2015-10-30 16:25:01 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 350x350">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702pre_cc3f4086f7912ee.jpg'
2015-10-30 16:25:02 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90 +matte -strip -colorspace RGB -resize 350x350">" -tile '/var/www/resourcespace/include/../gfx/watermark.png' -draw "rectangle 0,0 350,350" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702pre_wm_975f5a9eb7e9428.jpg'
2015-10-30 16:25:03 Contemplating thm (sw=5760, tw=150, sh=3840, th=150, extension=tif)
2015-10-30 16:25:03 Generating preview size thm to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702thm_9f16006624b1fd9.jpg
2015-10-30 16:25:03 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 150x150">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702thm_9f16006624b1fd9.jpg'
2015-10-30 16:25:04 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90 +matte -strip -colorspace RGB -resize 150x150">" -tile '/var/www/resourcespace/include/../gfx/watermark.png' -draw "rectangle 0,0 150,150" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702thm_wm_99f9f13cf638329.jpg'
2015-10-30 16:25:05 Contemplating col (sw=5760, tw=75, sh=3840, th=75, extension=tif)
2015-10-30 16:25:05 Generating preview size col to /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702col_c6eb6a1e2bc51b0.jpg
2015-10-30 16:25:05 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90  +matte -strip -colorspace RGB  -resize 75x75">" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702col_c6eb6a1e2bc51b0.jpg'
2015-10-30 16:25:06 CLI command: '/usr/bin/convert' '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702_b6725173a7703f5.tif'[0] +matte -flatten -quality 90 +matte -strip -colorspace RGB -resize 75x75">" -tile '/var/www/resourcespace/include/../gfx/watermark.png' -draw "rectangle 0,0 75,75" '/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702col_wm_10eb3ad98d42e00.jpg'
2015-10-30 16:25:07 SQL: select preview_attempts as value from resource where ref=1702
2015-10-30 16:25:07 SQL: update resource set preview_attempts=1 where ref='1702'
2015-10-30 16:25:07 SQL: select *,mapzoom from resource where ref='1702'
2015-10-30 16:25:07 SQL: SELECT name FROM plugins WHERE inst_version>=0 AND name like'col-%' ORDER BY priority
2015-10-30 16:25:07 SQL: select * from resource_type  order by order_by,ref
2015-10-30 16:25:07 SQL: select resource_type value from resource where ref='1702'
2015-10-30 16:25:07 use perms: 
2015-10-30 16:25:07 SQL: select d.value,d.resource_type_field,f.*,f.required frequired,f.ref fref from resource_type_field f left join (select * from resource_data where resource='1702') d on d.resource_type_field=f.ref and d.resource='1702' where ( f.resource_type=0 or f.resource_type=999 or f.resource_type='1') group by f.ref order by f.resource_type,f.order_by,f.ref
2015-10-30 16:25:07 SQL: select ref value from resource_type

tremendous thanks again..

Taylor
...

Allison M Stec

unread,
Oct 30, 2015, 1:06:52 PM10/30/15
to resour...@googlegroups.com
The log suggests previews are being created without issue. You can verify by tracing the file

/var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702scr_c2e761b995896a7.jpg

If the file is there have a look at the view page for resource 1702 and look at your browser's console and see what sort of error results from trying to load that image.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ad...@teepeepro.co

unread,
Oct 30, 2015, 3:00:42 PM10/30/15
to ResourceSpace
I looked in the /var/www/resourcespace/filestore/1/7/0/2_35b516352125872/  yet only the original TIF file exists there, as well as a metadump.xml file. Strange. 

I looked at folder permissions and all were set correctly. 

The only console message from my browser has is the following ajax related message, which I don't think is the cause of this particular problem.
http://******/resourcespace/pages/ajax/message.php?_=1446222252834 Failed to load resource: the server responded with a status of 500 (Internal Server Error)


One other question: When I see /var/www/resourcespace/include/../filestore/1/7/0/2_35b516352125872/1702scr_c2e761b995896a7.jpg, is this a concatenation of a longer SQL line with /var/www/resourcespace/include/ then /var/www/resourcespace/filestore/1/7/0/2_35b516352125872/? 

You are a saint among saints, thanks once more for helping me understand all of this.

Taylor


...

ad...@teepeepro.co

unread,
Nov 11, 2015, 1:45:04 PM11/11/15
to ResourceSpace
After looking in the folder to see if they preview files were created as stated in the debug log, I noticed that they were not created and didn't exist on my system. 

To try to isolate the problem...

I tried using the convert command, which Graphics/ImageMagick uses to create the preview files, from my sudo user account, and it worked fine. I also switched to the www-data user (the webserver user on apache/linux systems) and was successfully able to create a sample converted "preview" file, with correct file permissions. 

I have the watermark function turned on, so I checked and made sure the watermark file exists in the correct place. 

So at this point I am still scratching my head. RS seems to be able to find the correct file, but not create a preview, even though the debug log states it as being created, or at least attempting to create them (even giving them unique filenames). 

Any ideas are very much welcome!
...

ad...@teepeepro.co

unread,
Nov 11, 2015, 2:23:35 PM11/11/15
to ResourceSpace
SOLVED:

I finally realized that I am a dummy and desperately needed to update my ImageMagick. A simple sudo apt-get install imagemagick  was all the system needed update ImageMagick. Note to Ubuntu users: Seems as if ImageMagick isn't automatically updated in the normal sudo apt-get update

The most likely cause of this was that my ImageMagick version was ancient and RS was relying on updated commands to create the preview files, which the old ImageMagick was not compatible with. 

Thank you Allison, you were an immense help and helped me understand the RS system a lot better!

-T
...

Noel Slevin

unread,
Nov 11, 2015, 2:30:05 PM11/11/15
to ResourceSpace
Running sudo apt-get update only retrieves the updated list of programs. Running sudo apt-get upgrade is the command that upgrades the programs that are already installed :-)
Reply all
Reply to author
Forward
0 new messages