Welcome to Centmin Mod Community
Become a Member

PHP-FPM Uncaught Error: Call to undefined function imagecreatefromwebp()

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Oxide, Apr 30, 2017.

  1. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    Is this not included in centmin?

    PHP: imagecreatefromwebp - Manual

    If not. Could anyone provide some instructions on how I'd be able to include it? :p
     
  2. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    GD Support => enabled
    GD Version => bundled (2.1.0 compatible)
    Imagick compiled with ImageMagick version => ImageMagick 6.9.8-3 Q16 x86_64 2017-03-26 Convert, Edit, Or Compose Bitmap Images @ ImageMagick
    Imagick using ImageMagick library version => ImageMagick 6.9.8-3 Q16 x86_64 2017-03-26 Convert, Edit, Or Compose Bitmap Images @ ImageMagick
    ImageMagick copyright => © 1999-2017 ImageMagick Studio LLC
    ImageMagick release date => 2017-03-26
    ImageMagick number of supported formats: => 232
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
     
  3. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    gd
    Code (Text):
    php --ri gd
    
    gd
    
    GD Support => enabled
    GD Version => bundled (2.1.0 compatible)
    FreeType Support => enabled
    FreeType Linkage => with freetype
    FreeType Version => 2.4.11
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    libJPEG Version => 6b
    PNG Support => enabled
    libPNG Version => 1.5.13
    WBMP Support => enabled
    XPM Support => enabled
    libXpm Version => 30411
    XBM Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1
    

    imagick
    Code (Text):
    php --ri imagick
    
    imagick
    
    imagick module => enabled
    imagick module version => 3.4.3
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 6.9.8-4 Q16 x86_64 2017-04-25 http://www.imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 6.9.8-4 Q16 x86_64 2017-04-25 http://www.imagemagick.org
    ImageMagick copyright => © 1999-2017 ImageMagick Studio LLC
    ImageMagick release date => 2017-04-25
    ImageMagick number of supported formats:  => 232
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.skip_version_check => 0 => 0
    imagick.progress_monitor => 0 => 0


    You'd want to use ImageMagick via Imagick PHP extension for WebP as GD doesn't natively have WebP support though can be PHP: Installation - Manual

    might add that if I haven't already - vaguely recall looking at this in the past :)

    i do have with-vpx-dir in php config
    Code (Text):
    php-config --configure-options
    --enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-vpx-dir=/usr --with-t1lib=/usr --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --disable-fileinfo --with-ldap --with-ldap-sasl --enable-huge-code-pages --with-config-file-scan-dir=/etc/centminmod/php.d --with-xsl
    
     
    Last edited: Apr 30, 2017
  4. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    Both are enabled, strange.
     
  5. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    Code:
    GD Support => enabled
    GD Version => bundled (2.1.0 compatible)
    FreeType Support => enabled
    FreeType Linkage => with freetype
    FreeType Version => 2.4.11
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    libJPEG Version => 6b
    PNG Support => enabled
    libPNG Version => 1.5.13
    WBMP Support => enabled
    XPM Support => enabled
    libXpm Version => 30411
    XBM Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 0 => 0
    
    Code:
    
    imagick module => enabled
    imagick module version => 3.4.3
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 6.9.8-3 Q16 x86_64 2017-03-26 http://www.imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 6.9.8-3 Q16 x86_64 2017-03-26 http://www.imagemagick.org
    ImageMagick copyright => © 1999-2017 ImageMagick Studio LLC
    ImageMagick release date => 2017-03-26
    ImageMagick number of supported formats:  => 232
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.skip_version_check => 0 => 0
    imagick.progress_monitor => 0 => 0
    
    
     
  6. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    So where would I apply for example --with-vpx-dir=DIR, i guess i need to recompile PHP?
     
  7. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    testing a 123.09beta01 update as we speak :)
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    Tested PHP 7.1.4 - php shows as --with-webp-dir will php 5.5/5.6 show --with-vpx-dir
    gd with WebP enabled :D
    Code (Text):
    php --ri gd
    
    gd
    
    GD Support => enabled
    GD Version => bundled (2.1.0 compatible)
    FreeType Support => enabled
    FreeType Linkage => with freetype
    FreeType Version => 2.4.11
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    libJPEG Version => 6b
    PNG Support => enabled
    libPNG Version => 1.5.13
    WBMP Support => enabled
    XPM Support => enabled
    libXpm Version => 30411
    XBM Support => enabled
    WebP Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1
    
     
  9. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    May sound stupid, but where do I use that config ? Would it work to add it to custom_config.inc or whatever that file is called?
     
  10. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    Just update centmin mod 123.09beta01 via centmin.sh menu option 23 submenu option 2, exit centmin.sh, re-run centmin.sh menu option 5 to recompile PHP and it will automatically enable GD with WebP support if your system supports it i.e. has libwebp installed
     
  11. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    M
    Man, you are the best.
     
    • Like Like x 1
  12. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    benefits and flexibility of having PHP source compiled like Nginx is :D
     
  13. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    Worked perfect on 7.0.18 :)
     
    • Like Like x 1
  14. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
    Excellent :D

    So you have the WebP fever too :D
     
  15. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    1:40 PM
    Actually I needed to convert it to jpeg, since I'm experiencing browser issues with Firefox & WEBP x)
     
  16. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5
  17. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:40 PM
    Nginx 1.13.x
    MariaDB 5.5