Search code examples
phpfacebookcodeignitercurl-multi

PHP Codeigniter curl_multi_init error


This is my code:

class facebookConnection {

            // Allow multi-threading.

            private $_mch = NULL;
            private $_properties = array();

            function __construct()
            {

                        $this->_mch = curl_multi_init();

                $this->_properties = array(
                    'code'      => CURLINFO_HTTP_CODE,
                    'time'      => CURLINFO_TOTAL_TIME,
                    'length'    => CURLINFO_CONTENT_LENGTH_DOWNLOAD,
                    'type'      => CURLINFO_CONTENT_TYPE
                );
            }

I get Fatal error: Call to undefined function curl_multi_init() in /var/www/application/libraries/facebook.php on line 123

This is running on my local machine... could that be a problem? I don't understand.


Solution

  • it sounds like that function is not installed in your PHP.

    check phpinfo(); to see if it's enabled.