PDA

View Full Version : Call ExifTool from PHP



david81
07-02-2009, 02:59 PM
I'm hoping that someone can help out a relative PHP newbie. I can navigate the basics of PHP but this is certainly beyond me.

I got ExifTool installed through cPanel. Now I just need to know how to use it :)

The command line arguments I plan on using are
-overwrite_original -ExifVersion=0220

This should run on a directory of images and all subdirectories.

The reason I'm doing this is because PHP won't read EXIF from an image if it is using EXIF version 2.21. Changing this one tag allows PHP to grab the info. All I want to do is create a simple script that I can run at will to change the tag on the images in a directory.

Any chance you can help me out?

Thanks much.

david81
07-02-2009, 03:37 PM
Ok, so I figured out how to call ExifTool I think, but I found the following error in the logs...


Can't locate Image/ExifTool.pm in @INC (@INC contains: /home4/ghostli1/perl/usr/bin/lib /usr/lib/perl5/5.8.8/x86_64-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home4/ghostli1/perl/usr/bin/exiftool line 28.