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.




April 29th, 2013 at 2:05 pm
It’s working in Win7 for XAMPP. I have uncomment php_curl and restarted the server. Still it’s not working suggest me something.
April 1st, 2013 at 2:31 pm
great post, keep going
February 12th, 2013 at 11:08 am
thanks…
November 7th, 2012 at 5:41 am
Thank you…..It worked well…..
October 10th, 2012 at 2:19 pm
Thank you very very much i have googling so much for this issue of php.ini but now i have solve this using your article thanks again…………..
October 10th, 2012 at 9:53 am
Where i find PATH environment variable to added path to the curl dll?
Thanks
September 3rd, 2012 at 7:09 pm
thanks so much
my problem solved
August 1st, 2012 at 4:51 am
Thanks sir my problem solved.
July 27th, 2012 at 6:11 am
Thank you,. It works as you specified.
February 17th, 2012 at 12:04 pm
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
December 17th, 2011 at 8:44 am
Thnx sir my problem is solved..:)
September 27th, 2011 at 3:57 pm
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?
August 22nd, 2011 at 8:21 am
i am using wndows XP and xampp server. i couldn’t found php.ini file.
please hlep
July 30th, 2011 at 8:42 am
thank you.. it solved the issue..
April 23rd, 2011 at 9:47 am
very nice problem solved
June 8th, 2010 at 8:19 am
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