Using PHP to run exiftool
on an image.
My code is :
// $newEpoch is defined by user input
$date = date('Y:m:d G:i:s', $newEpoch);
shell_exec("exiftool '-DateTimeOriginal={$date}' '-FileModifyDate={$date}' '{$file}'");
This sets the DateTimeOriginal tag (Date Taken in Windows Explorer) perfectly, but it doesn't apply the FileModifyDate.
If I run exiftool '-FileModifyDate=someDate' someFilePath"
in a terminal, it works perfectly.
So why won't the PHP do it ?
I have no errors in the logs...
EDIT :
PHP is running in docker (container is php:apache8.2), host is a Raspberry Pi 4 running Debian.