I need to specify a directory when compiling php with --with-curl=
The curl binary is located at /usr/bin/curl
curl -V
gives me
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
locate curl
gives me
/usr/bin/curl /usr/lib/libcurl.so.3 /usr/lib/libcurl.so.3.0.0 /usr/lib64/libcurl.so.3 /usr/lib64/libcurl.so.3.0.0
removed /usr/share/... and other irrelevant files
UPDATE
Tried --with-curl=/usr/lib64
and --with-curl=/usr/lib
although I'm pretty sure it's 64 bit.
checking for cURL support... yes checking if we should use cURL for url streams... no checking for cURL in default path... not found configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/
SOLUTION
PHP requires curl-devel
Inside the src folder you will find the curl executable file. At this point, you need to copy the executable file and paste it inside a local folder on your PC to be able to run the curl.
php // Script to test if the CURL extension is installed on this server // Define function to test function _is_curl_installed() { if (in_array ('curl', get_loaded_extensions())) { return true; } else { return false; } } // Ouput text to user based on test if (_is_curl_installed()) { echo "cURL is <span style=\"color: ...
Windows 10, version 1803 or laterIf you have version 1803 or later of Windows 10, cURL is installed by default. To try it out, see Testing your cURL installation below.
None of these will allow you to compile PHP with cURL enabled.
In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl
. They generally are bundled in a separate development package.
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-gnutls-dev
Or CentOS:
sudo yum install curl-devel
Then you can just do:
./configure --with-curl # other options...
If you compile cURL manually, you can specify the path to the files without the lib
or include
suffix. (e.g.: /usr/local
if cURL headers are in /usr/local/include/curl
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With