Skip to content

AppImage needs exif extension #152

Description

@davekimble2

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
?>

Activity

  1. jgmdev commented on Sep 25, 2016

    @jgmdev
    Member

    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

  2. davekimble2 commented on Sep 25, 2016

    @davekimble2
    Author

    $ 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 ...

  3. jgmdev commented on Sep 26, 2016

    @jgmdev
    Member

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions