Home > database >  Is cURL in PHP tied to the local install of cURL?
Is cURL in PHP tied to the local install of cURL?

Time:10-21

IE, does PHP use its own, internal version of cURL or does it use whatever it finds in the local OS (Windows 10)? I'm in the unfortunate position of trying to make scripts written in 7.4 work on a permanent home that's saddled with 7.1. Before I force an update of PHP, I want to make sure chasing the right problem. I've searched php.ini and don't see a path to the local file system.

Thanks!

CodePudding user response:

The curl functions in PHP do not call out to a command-line version of curl, but rather to a library which can be integrated into a C program.

This version may be included "statically" when PHP is compiled, be a separate file installed alongside PHP, or use a shared file installed centrally on the server and used by multiple programs. This will be determined by the distribution package of PHP.

To determine the library version used, use the PHP infoinfo() curl

CodePudding user response:

I learned through the process of installing PHP 8.1 in my dev env and configuring it to use curl (and a comment), that PHP does call it's own curl executable, in the case of windows 10: php_curl.dll, and does not make an external call to curl in the operating system.

My fear was I'd go through the process of getting someone to upgrade PHP then have to have ask, again, to have curl upgraded.

Thanks to all who offered input!

CodePudding user response:

yes, but curl is an extension, you need to enable it in php.ini file

  • Related