Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17206

Re: prob with exec, exiftool and one photo

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: prob with exec, exiftool and one photo
Date 2016-12-13 23:42 +0100
Message-ID <ebbbpsF2t59U1@mid.individual.net> (permalink)
References <o2p6o9$pgl$1@shakotay.alphanet.ch>

Show all headers | View raw


On 12/13/2016 05:14 PM, Une Bévue wrote:

> i need to read exif infos from those files using the php script :
> 
>   $EXIFTOOL = '/usr/local/bin/exiftool';
>   $cmd = "$EXIFTOOL " . $data['PATH'];
>   exec($cmd, $Infos, $ExitStatus);
>   foreach($Infos as $line) {
>     $fields = explode(' : ', $line, 2 );
>     if(count($fields) == 2) {
>       $data[rtrim($fields[0])] = $fields[1];
>     }
>   }
>   $data['ExitStatus'] = $ExitStatus;
> 
> for 3 of those photos :
> Cirques.jpg
> Cirques.png
> IMG_3130.JPG
> 
> i get back the good exif infos, like :
> {
>   "ExifTool Version Number":  "10.20",
>   "File Name":  "IMG_3130.JPG",
>   "Directory":  "\/Users\/yt\/Sites\/tests\/Flipping_image\/photos",
>   "File Size":  "541 kB",
>   [...]
>   "Hyperfocal Distance":  "1.82 m",
>   "Light Value":  "4.0",
>   "ExitStatus":  0
> }
> 
> however for the photo '20161202_085945.jpg' the php script returns
> nothing even no error

What's the exit status code?

Have you verified that the path is correct? Is it a full path or a
relative path (in this case it may not be relative to the script
executed first)?


If your script takes all the files in the directory, but always missing
one file, then your outer loop has issues, as you haven't provided how
you get your $data in the first place, it's just a guessing game for us
who ain't mind readers.


-- 

 //Aho

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-13 17:14 +0100
  Re: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-13 17:15 +0100
  Re: prob with exec, exiftool and one photo "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-12-13 17:28 +0100
    Re: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-13 18:23 +0100
      Re: prob with exec, exiftool and one photo "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-12-14 00:19 +0100
  Re: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-13 18:03 +0100
    Re: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-13 18:28 +0100
  Re: prob with exec, exiftool and one photo "J.O. Aho" <user@example.net> - 2016-12-13 23:42 +0100
    Re: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-14 07:02 +0100
      Re: prob with exec, exiftool and one photo Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 17:37 +0100
        Re: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-14 18:13 +0100
  [BADLY SOLVED]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-14 08:11 +0100
    Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 17:43 +0100
      Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-14 18:24 +0100
        Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 19:57 +0100
      Re: [BADLY SOLVED]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-14 19:01 +0100
        Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 19:39 +0100
          Re: [BADLY SOLVED]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-17 09:11 +0100
            Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-17 09:33 -0500
        Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-15 06:19 +0100
    Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Eli the Bearded <*@eli.users.panix.com> - 2016-12-14 22:19 +0000
      Re: [BADLY SOLVED]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-15 06:30 +0100
      [UNSOLVABLE]: prob with exec, exiftool and one photo Une Bévue <unbewusst@fai.invalid> - 2016-12-17 08:08 +0100
        Re: [UNSOLVABLE]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-17 09:26 +0100
          Re: [UNSOLVABLE]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-17 10:45 +0100
            Re: [UNSOLVABLE]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-17 11:41 +0100
              Re: [UNSOLVABLE]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-17 17:39 +0100
                Re: [UNSOLVABLE]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-18 10:27 +0100
                Re: [UNSOLVABLE]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-21 11:36 +0100
                Re: [UNSOLVABLE]: prob with exec, exiftool and one photo "R.Wieser" <address@not.available> - 2016-12-21 16:58 +0100
                Re: [UNSOLVABLE]: prob with exec, exiftool and one photo Une Bévue <unbewusst.sein@fai.invalid> - 2016-12-22 07:08 +0100

csiph-web