Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Add WebP support to GD (PHP Module)

Discussion in 'EasyApache' started by BoxMan, Aug 9, 2016.

  1. BoxMan

    BoxMan Registered

    Joined:
    Aug 9, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UAE
    cPanel Access Level:
    Root Administrator
    In order to clarify the issue I don't have any problem with install PHP with GD enabled but when I want to use imagewebp() I got an error:

    Code:
    Fatal error: Call to undefined function imagewebp()
    After searching about the error I find the problem. I need to install GD --with-vpx-dir=DIR as I see in PHP.net: GD Installing/Configuring

    I know EasyApache will search for additional GD feature libraries (PHP Module: GD):
    • JPEG support > if find > libjpeg.so
    • PNG support > if find > libpng.so
    • XPM support > if find > libXpm.so
    But what about WebP? is this something like this:
    • WebP support > if find > libvpx.so
    I installed libvpx & libvpx-devel and after that I find libvpx.so as same path as libXpm.so and other *.so than I rebuild EasyApache and I expected see --with-vpx-dir=DIR in my phpinfo()
    configure command section, but nothing different and if I use imagewebp() got the error.

    Where am I wrong? and how to enable imagewebp() on my server (CentOS 7 - 64bit).
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. BoxMan

    BoxMan Registered

    Joined:
    Aug 9, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UAE
    cPanel Access Level:
    Root Administrator
    Thanks for useful link.

    I use EasyApache 3 and PHP 5. So I must create file:

    Code:
    /var/cpanel/easy/apache/rawopts/all_php5
    with this content:

    Code:
    --with-vpx-dir
    --path-to-vpx-dir=/usr/lib64/libvpx.so
    --my-option=
    
    --with-webp-dir
    --path-to-webp-dir=/usr/lib64/libwebp.so
    --my-option=
    
    And than rebuild, is it true?
     
  4. JacobPerkins

    JacobPerkins Well-Known Member

    Joined:
    May 2, 2014
    Messages:
    619
    Likes Received:
    96
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi BoxMan,

    This *should* work, but attempt it and see how it works.
     
  5. BoxMan

    BoxMan Registered

    Joined:
    Aug 9, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UAE
    cPanel Access Level:
    Root Administrator
    thanks, but no change. it's not work for me. I do as I said in last post.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Try using the following entries before running EasyApache again and let us know if it makes a difference:

    Code:
    --with-vpx-dir=/usr
    --with-webp-dir=/usr
    
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. BoxMan

    BoxMan Registered

    Joined:
    Aug 9, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UAE
    cPanel Access Level:
    Root Administrator
    hooray !!

    it's work, really thanks.

    Codes in box.. ;)
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice