I'm trying to write a WHM plugin (running into WHM plugins section so that it runs for root and resellers, not in cPanel). The script is located at /usr/local/cpanel/whostmgr/docroot/cgi and named as addon_httpcli.php so you may understand what I'm talking about.
The issue is this WHM environment has its own PHP binary and it seems compiled with less modules/functions enabled unlike most web servers. Here's what I've tried until now:
In short, I'm stuck at what to do exactly to solve this issue and finish my plugin. So maybe a smart coder has encountered a similar nightmare in the past and could point me to his/her solution.
Well you could use the HTTP_Request2 PEAR package. It is quite good and supports all HTTP-methods. I guess I call this the minimal-invasive solution.
If you want to use cURL there is another way (untested, but it should work):
Edit /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
and search for the entries with "Curl" in it. Just change the "0" to "1". After saving the file you should be able re-compile the cPanel PHP with /scripts/makecpphp