-1

I'm trying to install cURL on a Linux server and when I check to see which version (curl -V) I have it says:

curl 7.36.0 (x86_64-unknown-linux-gnu) libcurl/7.36.0 OpenSSL/1.0.1h zlib/1.2.8 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp Features: Largefile NTLM NTLM_WB SSL libz TLS-SRP

but when I try to run a curl function using a php script on the actual website I get a blank page. When I check the logs there's an error saying: Call to undefined function curl_init() so I'm not sure what's if it's enabled or not.

noobie_woobie
  • 129
  • 11
  • possible duplicate of [PHP CURL Enable Linux](http://stackoverflow.com/questions/8014482/php-curl-enable-linux) – Paul May 11 '15 at 16:36
  • In your edited question, you say you're trying to install curl, and then when you run curl it runs and displays its version string. So it's apparently working. What is your actual question? – Kenster May 11 '15 at 18:57
  • @Kenster sorry, I had actually put me detail in before but got a message telling me it was a duplicate of another question which wasn't relevant when I looked at it. I've added more of a description of the problem now – noobie_woobie May 12 '15 at 09:14

1 Answers1

0

PHP's curl_* functions don't use the curl binary, it uses cURL's libraries.

You'll need to install the cURL module for PHP or re-compile PHP with cURL enabled.

Please see this answer from the AskUbuntu StackExchange for additional information.

Community
  • 1
  • 1
Mr. Llama
  • 20,202
  • 2
  • 62
  • 115
  • Sorry I wasn't very clear. I've followed that process already but after doing so and restarting the server it still doesn't appear to be enabled, although it does look like it's installed. – noobie_woobie May 11 '15 at 16:39
  • How are you checking if it's enabled? `php -r 'var_dump( curl_version() );'`? – Mr. Llama May 11 '15 at 16:56
  • No I'm logging into the server using ssh then typing curl -V – noobie_woobie May 11 '15 at 17:06
  • What is it you're trying to do? Use command line `curl` or use the `curl_*` functions in PHP? – Mr. Llama May 11 '15 at 17:07
  • I want to be able to use the cURL function eventually but need to install in on the server first. I thought I had done that but it doesn't seem to be working still. I also tried to use `` but that just gave me a blank page – noobie_woobie May 11 '15 at 17:26