php的cURL问题

When i am tryin to manualy fetch a php page by passing URL, an exception is appearing which says

javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Uncaught exception 'Exception' with message 'Facebook needs the CURL PHP extension.

but when I searched php curl in my insatllation directory, I found it there.

[ashish@hpproliant ~]$ which php
/usr/local/bin/php
[ashish@hpproliant ~]$ which curl
/usr/local/bin/curl

I have modified php.ini file where a line related to curl was commented..What do i need do do now?? Thanks

maybe

sudo apt-get install php5-curl

Just follow the below steps, and check have you done exactly same as below:-

sudo apt-get install php5-curl

Make sure curl is enabled in the php.ini file (for me it's in /etc/php5/apache2/php.ini), if you can't find this line, it might be in /etc/php5/conf.d/curl.ini. Make sure the line :

extension=curl.so

is not commented out then restart apache, so type this into putty:

sudo /etc/init.d/apache2 restart

Debug:- Check whether curl is enable in PHP or not:-

Method 1:

function curlEnabled() {
    if (ini_get('safe_mode') == 1)
        return 0;

    return in_array('curl', get_loaded_extensions());
}

Method 2:

function_exists('curl_init');

and please print the php_info(); of your server and post it here.

Please Refer to the below links Too:- Detect if cURL works? PHP CURL Enable Linux