These are chat archives for collectiveaccess/support

12th
Sep 2018
Kehan Harman
@kehh
Sep 12 2018 00:40
@murchmurch not sure - have you tried reading the file directly with exiftool? Or with with an application that shows you the exif data? I know GIMP does a good job of this and is available for windows.
murchmurch
@murchmurch
Sep 12 2018 07:18
@kehh I have the excat same image file and the exact same data maping file on a Ubuntu system, where the exiftool extraction works correct. But on the windows machine it seems not to be able to find the exiftool exe file... Is there ant other way to extract metadata from a image and put it in to CA when you do a import of images?
murchmurch
@murchmurch
Sep 12 2018 07:29
@kehh As i understand its this line of code that does the actuall exiftool call:
exec("{$vs_path_to_exif_tool} -json -a {$vs_unknown_param} -g1 ".caEscapeShellArg($ps_filepath)." 2> /dev/null", $va_output, $vn_return);
If i enter the same line in the comand prompt i get a nice response from exiftool...
H:\exiftool -json - a -g1 H:/xampp/htdocs/providance17/import/mia/UlfWickbom_text.jpg
murchmurch
@murchmurch
Sep 12 2018 08:48

@kehh @collectiveaccess So i finaly figured it out. There where 3 things in conjunction that made this fail on a Windows machine:

1)
The function caExifToolInstalled() in mediaPluginHelpers.php always returned false on a windows system:
Sollution move up the :
if (caGetOSFamily() == OS_WIN32) to the top of the function, otherwise its never tested and the function returns false

2)In a Windows enviroment the function caExtractMetadataWithExifTool() in mediaPluginHelpers.php need to be changed. The exec that runs the exiftool uses the output redirection > that fails . :
exec("{$vs_path_to_exif_tool} -json -a {$vs_unknown_param} -g1 ".caEscapeShellArg($ps_filepath)." 2> /dev/null", $va_output, $vn_return);
needs to be changed to:
exec("{$vs_path_to_exif_tool} -json -a {$vs_unknown_param} -g1 ".caEscapeShellArg($ps_filepath)", $va_output, $vn_return);

3)
In the external application config the path to the exiftool.exe need to be put in as: c://path//exiftool so that PHP can read it and not in the standard windows path c:\path\exiftool

When all three changes are made then everything works!!!!!
I dont know if its possible to implement these changes in a future release @collectiveaccess?