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!

Call to undefined function curl_init() How to solve this ?

Discussion in 'EasyApache' started by serverack, Jan 7, 2012.

  1. serverack

    serverack Member

    Joined:
    Aug 14, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi,
    I am developing cpanel plugin which will connect it to amazon, I have attached its screenshot.
    cp2s31.JPG
    It is throwing error : Call to undefined function curl_init()

    I googleed around and came to know that it give such error when cURL is not installed so I recompiled PHP with 5.3x including cURL.

    I rebooted server but still getting same error.

    How can I solve this ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    66
    You will need to recompile cpanel's internal php with curl support. This is a different installation than the version that apache uses. You can do this in ssh by running the command /scripts/makecpphp. You might also need to edit /var/cpanel/easy/apache/profile/makecpphp.profile.yaml and set the following two lines to 1.

    Cpanel::Easy::PHP5::Curl: 1
    Cpanel::Easy::PHP5::CurlSSL: 1
     
    #2 sirdopes, Jan 7, 2012
    Last edited: Jan 7, 2012
  3. serverack

    serverack Member

    Joined:
    Aug 14, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Problem solved.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mrhillsman

    mrhillsman Registered

    Joined:
    Mar 21, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Excellent!!!

    Helped me fix issue I was having within cPanel.
     
  5. tsiedsma

    tsiedsma Active Member

    Joined:
    Nov 1, 2006
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Ankeny, Iowa
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm having this same issue. I realize this thread is old, but there aren't any newer threads.
    I've changed the following in my /var/cpanel/easy/apache/profile/makecpphp.profile.yaml.

    Cpanel::Easy::PHP5::Curl: 1
    Cpanel::Easy::PHP5::CurlSSL: 1

    upon execution of /scripts/makecpphp, the variables get reset. to this:

    Cpanel::Easy::PHP5::Curl: 0
    Cpanel::Easy::PHP5::CurlSSL: 1

    Regardless, after a successful build, curl_init still does not work. This is only affecting the 3rdparty php.

    /usr/local/cpanel/3rdparty/bin/php -m does not show curl listed either. Is there a way to force the cpphp to install curl?
     
  6. cPanelKurtN

    cPanelKurtN Well-Known Member
    Staff Member

    Joined:
    Jan 29, 2013
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    83
    cPanel Access Level:
    Root Administrator
    What version of cPanel/WHM are you using?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. tsiedsma

    tsiedsma Active Member

    Joined:
    Nov 1, 2006
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Ankeny, Iowa
    cPanel Access Level:
    Root Administrator
    Twitter:
    WHM 11.34.1 (build 12)
     
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