Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP8.2 AVIF image support has been disabled despite it being enabled #2024

Open
3 tasks done
alexscott64 opened this issue Sep 12, 2023 · 3 comments
Open
3 tasks done

Comments

@alexscott64
Copy link

Frequently asked questions

  • I have read Frequently Asked Questions
  • I have looked at the list of the existing issues (including closed issues) and searched if my issue has been already reported
  • I have tried to resolve the issue myself and will describe what I did in clear and consise manner

Describe the bug
PHP 8.2 on Ubuntu 22.04 claims to have AVIF support, but running the function: imagecreatefromavif() results in the error: imagecreatefromavif() AVIF image support has been disabled

To Reproduce
Steps to reproduce the behavior:

  1. Install PHP 8.2 and the gd extension using sudo add-apt-repository ppa:ondrej/php
  2. Using apache2, create a file and run echo phpinfo(); to confirm that AVIF Support is set to enabled
  3. Run $gd_image = imagecreatefromavif($image_path);
  4. This should result in the following warning: Warning: imagecreatefromavif(): AVIF image support has been disabled

What steps did you take to resolve issue yourself before reporting it here
I saw this issue with php8.1 and saw that php8.2 should have fixed it, so I upgraded to php 8.2 on Ubuntu 22.04 and made sure that everything was up to date. Similarly, I saw this issue with avif codecs on ubuntu and confirmed that I am on the correct version of libavif (0.9.2 had the bug):

=|/ Name              Version      Architecture Description
+++-=================-============-============-====================================================
ii  libavif-dev:amd64 0.9.3-3      amd64        Library for handling .avif files (development files)
ii  libavif13:amd64   0.9.3-3      amd64        Library for handling .avif files

Expected behavior
imagecreatefromavif() should work when AVIF image support is enabled.

Distribution (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS (Jammy)
  • Architecture: amd64
  • Repository: ppa:ondrej/php

Package(s) (please complete the following information):

500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main i386 Packages
     release v=22.04,o=LP-PPA-ondrej-php,a=jammy,n=jammy,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=i386
     origin ppa.launchpadcontent.net
 500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages
     release v=22.04,o=LP-PPA-ondrej-php,a=jammy,n=jammy,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=amd64
     origin ppa.launchpadcontent.net

Additional context
Additionally, here is the GD package information coming from phpinfo:

GD Support enabled
GD headers Version 2.3.3
GD library Version 2.3.3
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled
WebP Support enabled
BMP Support enabled
AVIF Support enabled
TGA Read Support enabled
@rfay
Copy link

rfay commented Sep 12, 2023

I'm sure this is a duplicate of

@alexscott64
Copy link
Author

I'm sure this is a duplicate of

They are running php8.1 which apparently wasn't compiled with AVIF support originally. See their output:

[AVIF Support] =>

In my case, AVIF support is enabled in GD info, yet, the function output seems to suggest otherwise. I was also told to open a new issue in that other thread.

@rfay
Copy link

rfay commented Sep 12, 2023

Will be glad to see it work. Haven't seen it work in any version yet, and was hoping it would work with Debian 12 Bookworm as well, don't think it's working there yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants