April 19, 2009 by Ivan Kristianto
[HowTo] Install Curl in PHP5 and Apache

This time i want to share with you how to install Curl in PHP5 in Linux Environtment (I’m using Ubuntu 8.10) and using apache web server, but if you have any question to install php-curl in other environment, feel free to contact me of leave any comment, i will glad to help you.
Okay, now let’s start with check if php-curl is already installed in your server or not. To check it please follow this step:
1. Create a file in your web server (in Ubuntu it would be in /var/www folder), name it info.php
2. Open that file and type this command:
<?php phpinfo(); ?>
3. Save that file
4. Open your favorite browser and open that file (ex: http://localhost/info.php)
5. Now you will see the Information about your PHP installation
6. Search for Curl, and if you cannot find it, it mean your php doesn’t have curl installed.
To install php-curl please follow this steps:
1. Open your terminal and type this command:
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt
2. After it finish open php.ini file (mine is at /etc/php5/apache2/php.ini ) and add this command: extension=curl.so
3. Save the file and restart apache with this command:
/etc/init.d/apache2 restart
4. Check the PHP information page again, you will find PHP-CURL installed
5. That’s it
Most hosting providers todays already have Curl installed on their server. Just in case you confuse which hosting provider are good to host your websites and have no downtime since i use it, you can try to look at Hawkhost. Thanks.
[HowTo] Broadcast Radio With Winamp + SHOUTcast to Ubuntu with IceCast2
[HowTo] Radio Streaming Server in Ubuntu Using IceCast2



wow awesome details If any one want any kind of gas producers just contact me.. for more details just simply click on top
- spam
- offensive
- disagree
- off topic
LikeI think this is an informative post and it is very useful and knowledgeable, great post.
- spam
- offensive
- disagree
- off topic
LikeI think this is an useful publish and it is very useful and knowledgeable, fantastic publish.
- spam
- offensive
- disagree
- off topic
LikeThanks for sharing this useful tips.
- spam
- offensive
- disagree
- off topic
LikeNice way to explain. I really like it.
- spam
- offensive
- disagree
- off topic
Likeworth sharing. Thanks.
- spam
- offensive
- disagree
- off topic
LikeSmall bits of content which are explained in details, helps me understand the topic, thank you!
http://topclassifiedsoftware.com
- spam
- offensive
- disagree
- off topic
LikeBeen doing everything from building php and libcurl from source, configuring php with the separately built curl module.... But couldn't make my apache server point to this newly-built php-bundle. But your two lines of instructions did the job! Thanks man! Thanks a lot!
- spam
- offensive
- disagree
- off topic
LikePlease enter a valid URL. Protocol is required (http://, https:// or ftp://)
- spam
- offensive
- disagree
- off topic
LikeThank you, works fine on Debian Lenny!
- spam
- offensive
- disagree
- off topic
LikeFor ubuntu server 11.04, the following works:
sudo apt-get install curl php5-curl
sudo /etc/init.d/apache2 restart
@bd123731de183ad12418f24a53a579b9:disqus -- Thanks :-)
- spam
- offensive
- disagree
- off topic
LikeGreat... thanks!
- spam
- offensive
- disagree
- off topic
Likei m using wamp server in windows but in my php curl is not present so how can i install for windows curl?
- spam
- offensive
- disagree
- off topic
LikeAre you using XAMPP? or you just install everything manually?
- spam
- offensive
- disagree
- off topic
LikeBeautiful! I was looking for just thing. Apt-get makes it so easy!
Thanks so much.
- spam
- offensive
- disagree
- off topic
LikeThank you very much, this article was useful for me
- spam
- offensive
- disagree
- off topic
LikeVeeery usefull, thanks for your valuable time.
- spam
- offensive
- disagree
- off topic
LikeGreat Buddy, tanQ for this valuable information...now itz easy 4 me .
- spam
- offensive
- disagree
- off topic
LikeThanks!!!
- spam
- offensive
- disagree
- off topic
LikeThank you very much, easy to understand and works like a charm :)
- spam
- offensive
- disagree
- off topic
LikeThank you so much!
- spam
- offensive
- disagree
- off topic
LikeWhere do we type the command you mentioned? Do we do it in DOS?
- spam
- offensive
- disagree
- off topic
LikeNo this article is for Ubuntu or Linux only. For Windows use xampp http://www.ivankristianto.com/web-development/server/local-server-for-testing-environment-with-xampp-on-windows/1566/ it's all there.
- spam
- offensive
- disagree
- off topic
LikeVery useful thank you...
- spam
- offensive
- disagree
- off topic
Likesudo aptitude install php5-curl
works for me.
- spam
- offensive
- disagree
- off topic
Likethanks
- spam
- offensive
- disagree
- off topic
LikeI want to install Curl into windows environment so please help me
- spam
- offensive
- disagree
- off topic
Likethanks
for those trying to install lately with ubuntu and didn't work with them, try first
sudo apt-get install curl php5-curl
in many cases this will be enough, if not, then proceed with the line in the article above it should run with no errors now.
it seems to me a broken dependency
- spam
- offensive
- disagree
- off topic
LikeGreat.. thanks! this worked for me..
- spam
- offensive
- disagree
- off topic
Likeworks fine, thx & merry christmas *<(:)-{)>
- spam
- offensive
- disagree
- off topic
LikeHi,
Just want to ask I follow the steps that you have.. but still i haven't install the cURL in my localhost it prompt me the below error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcurl3 is already the newest version.
Package libcurl3-dev is a virtual package provided by:
libcurl4-openssl-dev 7.18.0-1ubuntu2.2
You should explicitly select one to install.
E: Package libcurl3-dev has no installation candidate
Please help I need this to install on my PC for testing purposes..
thanks.
- spam
- offensive
- disagree
- off topic
Likeupdate your repository. What ubuntu version are you using?
- spam
- offensive
- disagree
- off topic
Likethanks man, it worked
- spam
- offensive
- disagree
- off topic
LikeTHX !
Still a few issues I had to run " /etc/init.d/apache2 restart " with sudo (as a super user aka root)
and the edit of "php.ini" was done using " sudo gedit php.ini " or directly using "sudo gedit /etc/php5/apache2/php.ini "
THX !
- spam
- offensive
- disagree
- off topic
LikeThanks a lot for this easy to use config page!!
Greetings from Sweden
- spam
- offensive
- disagree
- off topic
LikeThanks... that's helpful. Another easy way is to install it using Ubuntu Software Center...
- spam
- offensive
- disagree
- off topic
LikeHey!
Thanks a lot for the help. I needed to enable curl for the Wordpress Stats Dashboard.
- spam
- offensive
- disagree
- off topic
LikeWorked perfectly for me .. thanks a ton.
- spam
- offensive
- disagree
- off topic
LikeThanks alot, this saved me with installation of SugarCRm which needed the curl module enabled.
- spam
- offensive
- disagree
- off topic
LikeHi,
I am getting the following error, kindly help.
--------------
]# sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt
sudo: apt-get: command not found
---------------
Thanks,
AS
- spam
- offensive
- disagree
- off topic
Likethat command only for ubuntu and debian. if you are using centos, fedora or RHEL use yum instead
- spam
- offensive
- disagree
- off topic
LikeAwesome thanks mate
- spam
- offensive
- disagree
- off topic
LikeThanks! Was useful!
- spam
- offensive
- disagree
- off topic
LikeHi, this was very usfull. Thank you, you saved me a lot of time!
Kind Regards
- spam
- offensive
- disagree
- off topic
LikeI LOVE YOU. YOU HAVE SAVED ME FROM JUMPING IN FRONT OF A TRUCK. I WAS ABOUT TO TAKE THIS COMPUTER AND THROW IT OUT THE WINDOW
- spam
- offensive
- disagree
- off topic
LikeHi Ivan
Nice page,
I try to develop a facebook aplication in a free hosting but it shows "Facebook needs the CURL PHP extension." what can be? thanks
- spam
- offensive
- disagree
- off topic
LikeYou need to install curl in your web server before it can connect to Facebook.
- spam
- offensive
- disagree
- off topic
Likei will lick to no more about the terminal commands and there are mining tans to u.. i hope to here if u... my name is lamptey from ghana email:latifani2@yahoo.com
- spam
- offensive
- disagree
- off topic
LikeTerimakasih! I got some errors on restarting apache, but it seems to be working fine.
- spam
- offensive
- disagree
- off topic
LikeThank you very much! You help a lot.
- spam
- offensive
- disagree
- off topic
Like