AppImage needs exif extension
Lubuntu 16.04 (64), wxphp-gtk2 (wxphp-3.0.2.0-gtk2-amd64)
I have a wxphp script that picks a JPG image file, loads it, displays the image and its EXIF data. It relies on PHP's function exif_read_data() to parse the stuff and put it into an array(array()). That needs the PHP extensions mbstring.so and exif.so
When I run it, it can't find function exif_read_data(). When I put a print phpinfo(); in the script, it seems to show mbstring is enabled in there, but not exif. So I need to edit php.ini , but since it is bundled in wxphp-gtk2, I don't think I can get at it to change it. And it seems that's not one of the things you can change with: ini_set('extension', "exif.so"); I guess that makes sense - if you had exif.so in the bundle, you would have enabled it.
So is there a way around this, or can I ask you nicely to rebuild the package with exif support, please?
<?php // run with wxphp-gtk2
$file = "/path/to/image.jpg";
$exiftags = exif_read_data($file, 0, true);
// var_dump($exiftags); // some binary stuff in here
print "$file: FileDateTime: ".$exiftags['FILE']['FileDateTime']."\n"; // integer
print "$file: DateTime: ".$exiftags['IFD0']['DateTime']."\n"; // formatted string
?>
you can try something like:
wxphp -d extension=exif.so file.php
with the -d flag you can pass any of the flags available on the php.ini file
$ wxphp-gtk2 -d extension=exif.so exif.wxphp PHP Warning: PHP Startup: Unable to load dynamic library '././/lib/modules/exif.so' - ././/lib/modules/exif.so: cannot open shared object file: No such file or directory in Unknown on line 0 Fatal error: Call to undefined function exif_read_data() in ...
whoops I was taking a look now at my appimage build and all extensions are built statically into php except for wxwidgets and opcache, will play with this later and republish a new appimage that includes exif