Get the most out of your Centmin Mod LEMP stack
Become a Member

Beta Branch add optional external libgd PHP extension support in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 4, 2021.

  1. eva2000

    eva2000 Administrator Staff Member

    48,519
    11,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,306
    Local Time:
    5:20 AM
    Nginx 1.21.x
    MariaDB 10.x
    add optional external libgd PHP extension support in 123.09beta01

    - PHP usually installs libgd version that is bundled with PHP. However, you can also opt to install a newer version of libgd with PHP. This update optionally allows installing PHP with an external more up to date libgd version for PHP 7.4+ and PHP 8.0-8.1 https://www.php.net/manual/en/image.installation.php
    - Add libgd 2.3.3 support libgd/CHANGELOG.md at gd-2.3.3 · libgd/libgd when PHP_LIBGD_EXTERNAL='y' variable is set in persistent config file /etc/centminmod/custom_config.inc prior to running centmin.sh menu option 5 PHP upgrade/recompiles
    - External libgd support is handled differently in PHP 7.4+ and PHP 8.0+ compared to PHP 7.0 to 7.3. So external libgd support is only for PHP 7.4+ and PHP 8.0-8.1

    examples

    with PHP 8.0.13

    Code (Text):
    php --ri gd
    
    gd
    
    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
    TGA Read Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1


    with PHP 8.1.0 adds AVIF image support if libheif library is detected. Centmin Mod doesn't install libheif by default. But my test server has experimental libheif library install support which I've been testing.

    Code (Text):
    php --ri gd
    
    gd
    
    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
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1


    compared to bundled libgd with PHP 8.1.0


    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.8.0
    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
    BMP Support => enabled
    TGA Read Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1


    Continue reading...

    123.09beta01 branch
     
  2. rdan

    rdan Premium Member Premium Member

    5,237
    1,307
    113
    May 25, 2014
    Ratings:
    +2,014
    Local Time:
    3:20 AM
    Mainline
    10.2
    Curious why this isn't ON by default?
     
  3. eva2000

    eva2000 Administrator Staff Member

    48,519
    11,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,306
    Local Time:
    5:20 AM
    Nginx 1.21.x
    MariaDB 10.x
    Hasn't been tested much that's why. Usually for some things in Centmin Mod delays aren't because they haven't been added/enabled but because they haven't been tested as much. Adding something to Centmin Mod is easy, but testing it properly takes quite some time. It's not uncommon for a Centmin Mod feature to undergo weeks/months of active testing when I have the time - most I have ever done for a feature IIRC is 300 test Centmin Mod installation runs in 5 days! :D