Main Menu

Problem Installing

Started by Archive, May 12, 2010, 08:54:40 AM

Previous topic - Next topic

Archive

[Originally posted by sperry on 2009-09-05 12:39:15-07]

Ok, here is what I'm trying to do. I have a script I wrote which searched a folder on my server to find all the new photos in the directory. Once if finds them it added them along with some default info to a database so I can add them to my site. To make my job easier, I'd like to call the Image-ExifTool from within this script to read a few bits of info from the images and put add it to the default info.

My problem is that when I use the line ...

use Image::ExifTool qw(:Public);

... in my script I get a 500 error. I'm assuming this is because I don't have the module installed right. I don't have root access to the server I'm using so I copied the everything from the zip I downloaded into the directory the script is in. Then I chmoded everything to 755. This worked with a Image::Size Module which I use with the same script.

Does anyone have any advice for me?

Sheldon

Archive

[Originally posted by atvonk on 2009-09-05 18:58:56-07]

Hi Sheldon,

Well, just unzipping and copying into a directory is probably not the way ExifTool is supposed to be installed. I would highly recommend using CPAN. A quick guide to how to use it when not root is: Installing Perl Modules as a Non-Root user. I just tried it out using the command "cpan" instead of the "perl -MCPAN -we shell" thing, and it worked fine. I verified correct installation by using the command "exiftool file.gif", with file.gif being one of the images on my website.

By the way: chmod 755 is only needed for CGI scripts and Perl scripts (like cpan and exiftool), not for Perl modules like Image::Size, etc.

Also, I would recommend checking out the module CGI::Carp. This will allow functions like warningsToBrowser and fatalsToBrowser to package Perl warnings and errors into the HTML output of your script. That can help a lot tracking this kind of thing down, too.

Good luck with your installation. Alexander.

Archive

[Originally posted by exiftool on 2009-09-05 22:59:38-07]

Another trick is to put this line before "use Image::ExifTool":

Code:
BEGIN { push @inc, 'path/to/exiftool/lib' }

Take a look at the "exiftool" application, this is what I do here
assuming that the "lib" directory is in the same place as the
application.

- Phil