[Originally posted by tygertyger on 2008-09-12 11:41:57-07]
Sorry to bother you with this, I'm not familiar at all with what I'm doing and am getting in a right mess here.
I am using PHP on Unix. I am trying to run the Makefile.PL file. The main directory resides at /var/www/perl/exiftool/ and the lib directory is at /var/www/perl/exiftool/lib.
Initially Makefile.PL failed to find the lib files: "Could not open 'lib/Image/ExifTool.pm': No such file or directory".
So I manually altered the file with the absolute locations: VERSION_FROM => '/var/www/perl/exiftool/lib/Image/ExifTool.pm' and ABSTRACT_FROM => '/var/www/perl/exiftool/lib/Image/ExifTool.pod'. Now it apparently finds the files OK but I get the error "Writing: command not found".
I have altered the exiftool file values to the following and every variation I could think of including one or both using the defaults, none of which worked:
$exeDir = "/var/www/perl/exiftool";
unshift @INC, "/var/www/perl/exiftool/lib";
I would really appreciate some help from anyone who could point out where I'm going wrong.
[Originally posted by exiftool on 2008-09-12 12:00:44-07]
You are running "perl Makefile.PL" from within the Image-ExifTool-7.42
diretory, right? If so, I can't understand why it wouldn't work.
But the good news is that you don't need to build exiftool. You can use it
as is by just running the "exiftool" script from where it is. Or you can move
it to any other directory and run it from there as long as you also move
the "lib" directory to the same directory where "exiftool" is located.
I hope this helps.
- Phil
[Originally posted by tygertyger on 2008-09-13 23:12:59-07]
It did help thank you, I did as you suggested and ignored the mystery Makefile step. I never found what the problem was.
For anyone wondering as I was since I could find no interpreter-specific experience anywhere, you can run exiftool in mod_perl from PHP by executing shell commands using the backtick operators, like this. Upload the contents of the exiftool folder to the mod_perl directory first, of course.
$output = `perl /path/to/exiftool/file -commands -go -here -etc /path/to/image/goes/here/etc.jpg`;
The script response is stored in $output which you can view or manipulative as you please in the normal way. Don't forget to escape variables using escapeshellcmd.