We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27444 ☆ A M B ☆
    • 117 Posts
    Hi,

    I’m using a snippet with the following to get an image’s exif data:

    <?php
    echo "test1.jpg:<br />\n";
    $exif = exif_read_data('tests/test1.jpg', 'IFD0');
    echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";
    
    $exif = exif_read_data('tests/test2.jpg', 0, true);
    echo "test2.jpg:<br />\n";
    foreach ($exif as $key => $section) {
        foreach ($section as $name => $val) {
            echo "$key.$name: $val<br />\n";
        }
    }
    ?>


    But I’m getting the following error page:

    test1.jpg:
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: exif_read_data() [function.exif-read-data]: Unable to open file
    Error type/ Nr.: Warning - 2
    File: /var/www/vhosts/domain.com/httpdocs/manager/includes/document.parser.class.inc.php(814) : eval()’d code
    Line: 3

    Parser timing
    MySQL: 0.0014 s (3 Requests)
    PHP: 0.0229 s
    Total: 0.0243 s

    Anyone encountered such a problem?
      Steven James McLean
      Tech Lead
      springbokagency.com
      • 27444 ☆ A M B ☆
      • 117 Posts
      Solved grin
        Steven James McLean
        Tech Lead
        springbokagency.com
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        I’m guessing you had the paths wrong, but mind sharing your solution in case others find this topic some day with a similar problem?
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 27444 ☆ A M B ☆
          • 117 Posts
          Yes, exactly. I got the wrong path.
            Steven James McLean
            Tech Lead
            springbokagency.com