claudiogc Posted September 3, 2014 Share Posted September 3, 2014 (edited) Good evening! I'm trying to use libcurl with php in my Debian and apparently it is not working unless i'm doing something wrong. So, when i enter with "aptitude search libcurl", my output is: v libcurl-dev - p libcurl-ocaml - OCaml curl bindings (Runtime Library) p libcurl-ocaml-dev - OCaml libcurl bindings (Development packagv libcurl-ocaml-dev-owsj4 - v libcurl-ocaml-owsj4 - v libcurl-ssl-dev - i A libcurl3 - easy-to-use client-side URL transfer librap libcurl3-dbg - debugging symbols for libcurl (OpenSSL, Gnv libcurl3-dev - i A libcurl3-gnutls - easy-to-use client-side URL transfer librav libcurl3-gnutls-dev - p libcurl3-nss - easy-to-use client-side URL transfer librav libcurl3-nss-dev - v libcurl3-openssl-dev - v libcurl4-dbg - v libcurl4-dev - p libcurl4-gnutls-dev - development files and documentation for lip libcurl4-nss-dev - development files and documentation for lip libcurl4-openssl-dev - development files and documentation for li The "i" means it is installed, i believe. Then, i read this tutorial and changed a little bit a code posted in it. http://php.net/manual/en/curl.examples.php <?php function cURLcheckBasicFunctions() { if( !function_exists("curl_init") && !function_exists("curl_setopt") && !function_exists("curl_exec") && !function_exists("curl_close") ) return false; else return true; } if( !cURLcheckBasicFunctions() ) { echo "UNAVAILABLE: cURL Basic Functions"; } else { echo "cURL is working fine!"; } ?> I believe if libcurl were installed in my system i should see "cURL is working fine", but my output is "UNAVAILABLE: cURL Basic Functions". So, what is wrong? Edited September 4, 2014 by claudiogc Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 4, 2014 Share Posted September 4, 2014 (edited) libcurl is the OS/Debian curl package, you need to install and enable the PHP curl library in your php.ini and reboot the web server. I think debian calls it "php5-curl". You can see if it's enabled via phpinfo(); Edited September 4, 2014 by CroNiX Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.