How to enable exif_read_data
In one of my scripts I'm getting
Fatal error: Uncaught Error: Call to undefined function exif_read_data()
Which module do I need to install, and can someone point me to the instructions for installing a new module in Laragon.
Okay so I have checked the php.ini and
extension=exifis uncommented, but if I go to Menu > PHP > Extensions
exifis not checked, and nothing I can do will check it.
I'm running PHP 8.0.0 and Laragon Lite 4.0.15
Alternatively, the three known problems with Laragon 4 when switching to PHP8 are:
@Pen-y-Fan Many thanks. I've got PHP8 working with Laragon 4. I missed the announcement that v 5 was out. I will try that - thanks again.
Okay, I have upgraded to Laragon 5. That seems okay. And I upgraded Apache to VS16.
However, as before when I tried VS16, SSL does not seem to be working. I tried going to laragon Menu > Apache > SSL and clicking on "Add laragon.crt to Trust Store" but this made no difference.
extension=exifis not commented out in php.ini, it is not ticked as being enabled if I go to Menu > PHP > Extensions and I can't enable it from there.
@gandalf458 : Do you have any error message or images?
SSL works fine if I use VC15 but if I change to VS16 and I try to use HTTPS I get
This site can’t be reached
The webpage at https://localhost/ might be temporarily down or it may have moved permanently to a new web address.
@gandalf458 : This link should help:
@leokhoa - thanks. I'll give it a try
@leokhoa That works, thanks.
Still can't get it to enable the exif extension though.
@gandalf458 : As I remember exif is enabled by default in Laragon. If you have a video/image it is easy to help you.
Otherwise, you can:
- Rename your PHP Path to other name
- Add the same version of PHP:
@leokhoa - thanks. I'll take this opportunity to upgrade to PHP8.0.7 and see how that goes.
Okay, so that didn't go so well. New version copied to new folder fine but when I changed versions I got the following error:
Meanwhile, here's a screenshot showing exif not ticked/enabled:
and this is the relevant part of my php.ini
;extension=bz2 extension=curl ;extension=ffi ;extension=ftp extension=fileinfo extension=gd ;extension=gettext ;extension=gmp extension=intl ;extension=imap ;extension=ldap extension=mbstring extension=exif ; Must be after mbstring as it depends on it extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client ;extension=odbc extension=openssl ;extension=pdo_firebird extension=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql extension=pdo_sqlite ;extension=pgsql
@gandalf458 : Apache may refer to old
PHP dll, please re-add Apache also.
@leokhoa I'm not clear what "re-add" means. I have swapped between VS16 and VC15 and back again but still have the same result. Should I be doing something different?
Ah okay. I think I've solved it. I just reverted to PHP 5.46 then to 8.0.7 and exif is now enabled. I don't understand why it worked, but it did! Phew!