You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
?>
$ 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
Activity
jgmdev commentedon Sep 25, 2016
you can try something like:
with the -d flag you can pass any of the flags available on the php.ini file
davekimble2 commentedon Sep 25, 2016
$ 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 ...
jgmdev commentedon Sep 26, 2016
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