How to disable --with-curlwrappers on php compile on my VPS?

Avatar
  • updated
  • Answered
I'm having trouble understanding how to turn off a php compilation flag on my VPS hosting. Here's the breakdown:

I'm trying to install Composer (a dependency manager for php) on my server as part of a Wordpress project. Using command line and ssh-ing into my server, I run the following command in my public_html directory to do so:

$ curl -s http://getcomposer.org/installer | php

My console says the installation is successful, but includes this warning:

"PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.
Recompile it without this flag if possible"

I have checked the php.ini file located in my public_html directory as well as grepped the php.ini file in usr/local/lib/php.ini without any results - I can't seem to find where/how to turn off the --with-curlwrappers flag on build. Can you offer advice on how this can be done?

One other confusing aspect of this: if I got to my phpinfo() page for my domain, it says the "Loaded Configuration File" is php.ini in the public_html directory. However, if I run "php -i" while on ssh command line in the public_html directory, the "Loaded Configuration File" now reads "/usr/local/lib/php.ini". Why the difference?

FYI, I do have root access on my VPS. Any feedback is greatly appreciated.
Avatar
Scott
Hello EndureFort, I neglected to answer one of your questions in my last reply. You asked: "One other confusing aspect of this: if I got to my phpinfo() page for my domain, it says the "Loaded Configuration File" is php.ini in the public_html directory. However, if I run "php -i" while on ssh command line in the public_html directory, the "Loaded Configuration File" now reads "/usr/local/lib/php.ini". Why the difference? " The answer is that when you are in the ssh, you are not running through Apache and any htaccess rules that override the defaults are not in play. The /usr/local/lib/php.ini is the default php.ini file for your entire account and is used if a local one (in a cpanel) is not present. Best Regards, Scott M
Avatar
Scott
  • Answered

Hello EndureFort,

That is a setting that can be disabled by recompiling the Apache with an u[date tool called Easy Apache. Unfortunately, that is only available with Root access.

For anyone finding this question with root access, perform the following:

Log into the WHM and begin the Easy Apache update

When getting to step 5 (Exhaustive Options list) find and uncheck the Curlwrappers option.

Click "Save and Build"

For those that do not have the root access option and do not want it, the request can be made to our Live Support department.  They can be reached via a ticket submitted through the AMP interface.

Best Regards,

Scott M