6.0.0-beta1
8/28/25

[#10646] ansel command has sql error with exif
Summary ansel command has sql error with exif
Queue Ansel
Queue Version 2.0-ALPHA1
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester michael (at) bigmichi1 (dot) de
Created 10/13/2011 (5068 days ago)
Due
Updated 10/15/2011 (5066 days ago)
Assigned 10/13/2011 (5068 days ago)
Resolved 10/15/2011 (5066 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/15/2011 02:27:25 PM Michael Rubinsky State ⇒ Resolved
 
10/15/2011 05:23:45 AM michael (at) bigmichi1 (dot) de Comment #9 Reply to this comment
this fixed the error thanks
10/15/2011 01:10:00 AM Michael Rubinsky Comment #8 Reply to this comment
Stange. That field is not supposed to be a structure/array, but a 
string. It is returned as a string for me locally as well.

Nevertheless, try what I committed and see if it fixes it for you. 
This fix is actually in Horde_Image.
10/15/2011 01:08:21 AM Git Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

This isn't supposed to happen, but it seems that some exif drivers 
return an array.
Possible fix for Bug: 10646

  1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/39a4d84b11430be11cdd533ed39dd7e3650ce7fc
10/14/2011 08:36:18 PM michael (at) bigmichi1 (dot) de Comment #6 Reply to this comment
it doesn't help:

the error occurs for the tag:
Creator                         : Photographer: Thomas Roeher, Thomas Röher

and these are then the params:
$name:
string(7) "Creator"

$value:
array(2) {
   [0]=>
   string(27) "Photographer: Thomas Roeher"
   [1]=>
   string(13) "Thomas Röher"
}

10/14/2011 07:46:21 PM Michael Rubinsky Comment #5 Reply to this comment
I am unable to reproduce this, for me, the exif code doesn't return 
empty exif properties. I put a check to prevent attempting to save 
empty/null values though. See if this helps...
10/14/2011 07:44:47 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

Don't save empty EXIF values.
Potentially fixes Bug: 10646

  1 files changed, 6 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/10a77a94db4918cfad7de93f46005efcfc0fd8cd
10/13/2011 04:37:54 PM michael (at) bigmichi1 (dot) de Comment #3 Reply to this comment
i use exiftool 6.20 on debian
10/13/2011 02:11:06 PM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Feedback
Reply to this comment
What exif driver are you using?
10/13/2011 06:14:32 AM michael (at) bigmichi1 (dot) de Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ ansel command has sql error with exif
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
when i run:

./ansel -u test@bigmichi1.de -p xxx -g 6 exif

i got:

Schwerer Fehler:
SQLSTATE[42000]: Syntax error or access violation: 1064 Fehler in der 
SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen bei ')' 
in Zeile 1

1. Ansel_Cli_Helper_Local->exif() /var/www/pear/ansel:171
2. Ansel_Image->getEXIF() /var/www/pear/ansel:776
3. Ansel_Storage->saveImageAttribute() /var/www/horde4/ansel/lib/Image.php:737


in horde.log i found this:
2011-10-13T08:07:32+02:00 ERR: HORDE [ansel] SQL QUERY FAILED: 
SQLSTATE[42000]: Syntax error or access violation: 1064 Fehler in der 
SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen bei ')' 
in Zeile 1
         INSERT INTO ansel_image_attributes (image_id, attr_name, attr_value)
           VALUES ('2', 'Creator', ) [pid 19349 on line 812 of 
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]

Saved Queries