문제

For some reason my production server is giving me a 500 server error when running the exif_read_data() function on a jpg image. I have verified that the image is indeed a jpg, exists, and has proper permissions. The function works perfectly on my localhost machine.

What could possibly cause this error?

The server is running PHP 5.3.17, my localhost is running 5.3.8, but I doubt that should make a difference.

Thank you.

EDIT: my simple code.

error_reporting(E_ALL);
$path = '/home/user/staging/files/image.jpg';
$exif = exif_read_data($path);
var_dump($exif);
도움이 되었습니까?

해결책

For anyone wondering what the solution was, it was to recompile Apache with the exif module enabled. Apparently it's possible not to have it on by default.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top