The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. BoxMan

    BoxMan Registered

    Joined:
    Aug 9, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    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. cPJacob

    cPJacob cPanel Product Owner
    Staff Member

    Joined:
    May 2, 2014
    Messages:
    509
    Likes Received:
    64
    Trophy Points:
    28
    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:
    1
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. BoxMan

    BoxMan Registered

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

    it's work, really thanks.

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

Share This Page