wordpress blog stats

If you are getting the following error while browsing any website in Windows or Linux (Ubuntu) like:

Fatal error: Call to undefined function curl_init()

then here is a simple and easy solution, for both Windows and Linux (Ubuntu) users.

For Windows

If you are having the error Call to undefined function curl_init() in Windows, then you have to simply modify a line in apache’s php.ini file.

Goto your wamp folder, which would be like:

D:\wamp\bin\apache\apache2.2.6\bin\

And open the file

php.ini

If you are unbable to find the folder of file as mentioned above, or if you are using some other server in Windows, then simply find the php.ini file located under apache folder (and not php folder), and open it in a text editor.

Find the text

extension=php_curl.dll

and remove the semi-colon at the start.

Now that line would look like:

extension=php_curl.dll

(without semi-colon on start)

Save the file, and restart your Apache Server. And the problem is solved.

For Ubuntu (Linux)

If you are having the error Call to undefined function curl_init() in Ubuntu or Linux, then you have to simply install php5-curl to make this problem resolved.

Simply goto:

System -> Administration -> Synaptic Package Manager

And find the package or software as “php5-curl“ or php curl

and install the CURL module for PHP. After successful installation, restart your Apache Server with the following command:

sudo /etc/init.d/apache2 restart

And the problem is solved.

Or

Or goto gnome-terminal, and write the following command:

sudo apt-get install php5-curl

(if php5 is not the latest php version, then find the latest php curl package and install it)

After successful installation, restart your Apache Server with the following command:

sudo /etc/init.d/apache2 restart

And the problem is solved.

Related posts:

  1. Install PHP, MySQL and Apache (LAMP) on Ubuntu (Linux)
  2. PHP Tweets for Twitter
  3. Windows XP License Key on behalf of Windows Vista or Windows 7 License Key
  4. You don’t have permission to access http://localhost files or folders on this server in Ubuntu (Linux)

7 Responses to “Fatal error: Call to undefined function curl_init() Windows and Linux (Ubuntu)”

  1. STILL DOES NOT WORK Says:

    I cannot get it to work. I’ve un-commented-out the thing in the ini file, and restarted my entire server, and all is NOT well, and it will NOT work. HELP!!

    Windows Vista

  2. very nice problem solved

  3. thank you.. it solved the issue..

  4. i am using wndows XP and xampp server. i couldn’t found php.ini file.

    please hlep

  5. I have Vista, Apache, PHP 5.3.8

    cUrl runs from command line

    cUrl is activated (uncommented) in the PHP.INI file
    the DLL is where all the others are

    cUrl does NOT show up in PHPINFO
    Still get “Call to undefined function: curl_init()”

    I have no idea how to fix this.

    This EXACT setup works fine on my XP Pro PC

    Anyone?

  6. Thnx sir my problem is solved..:)

  7. Walter, I had what sounds like the exact same problem as you but could find no help on the internet.

    I finally solved it by adding the path to the curl dll to my PATH environment variable.
    That is, I added:

    C:\Program Files\PHP\ext\

    to the windows system variable PATH, then restarted httpd.

    I already had C:\Program Files\PHP\ in my path but it seems that was not enough.

    Hope this helps you or somebody else.

    - Michael

Leave a Reply