A
A
Arseniy Shkarlatov2019-02-07 12:43:13
linux
Arseniy Shkarlatov, 2019-02-07 12:43:13

How to update curl library for php?

Good day to all!
It is necessary to update the curl library from version 7.29 to at least version 7.34, I can’t figure out how to do this, where can I get it?
Tried through pecl, there is no curl at all, tried yum install php-pecl-curl, also to no avail. I also tried to update from the sources located at the office. site , as a result, the utility itself was updated to the latest version (there are no problems with it) and three libraries libcurl.a, libcurl.la and libcurl.so.4.5.0 were compiled. I tried to replace the libcurl.so.4.5.0 library with the current one in the php libraries directory, but php when trying to check for the version of curl in php with the command:

php -r "echo 'PHP cUrl version:\ '.curl_version()['version'];"

shows that this library is not a php library:

PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'curl.so' in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function curl_version() in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
Fatal error: Uncaught Error: Call to undefined function curl_version() in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1

Can you please tell me how to update this library?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bkosun, 2019-02-07
@Shalpey

yum install php-curl
If you need to install a version that is not in the repository, you can install it manually.
https://curl.haxx.se/download.html
Please note:
php.net/manual/en/curl.installation.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question