cURL : Enabling [ PHP, Ubuntu ]
To check whether the curl is enabled in your environment, create a php file as below and browse to file know the details.
<?php
echo ‘<pre>’;
var_dump(curl_version());
echo ‘</pre>’;
?>
save as testCurl.php
Fatal error: Call to undefined function curl_version() indicates is not enabled. To enable curl now open you php.ini file and look for this line: extension=php_curl.dll
Remove the semi-colon in front of extension=php_curl.dll
For php 5 , we need not recompile again for curl and curl devel to be included . We could follow the following as ‘raptormanod’ mentions in forum.
Step1. Open terminal and type :sudo synaptic
saffrongeek@saffrongeek-laptop:~$ sudo synaptic
Step2.Search for curl, select All and type ‘curl’ in search box and search. Check the php-curl from the searched list.
Step3.Apply the packages. Then open up your php.ini file at sudo vi /etc/php5/apache2/php.ini
Step4. Add the following line.
extension=php_curl.dll
Step5.Save and restart Apache:
sudo /etc/init.d/apache2 restart
——————————– Terminal————————————
saffrongeek@saffrongeek-laptop:~$ sudo synaptic
saffrongeek@saffrongeek-laptop:~$ sudo vi /etc/php5/apache2/php.ini
saffrongeek@saffrongeek-laptop:~$ restartapache
* Restarting web server apache2 … waiting
————————————————————————————————-
Loading...
Thank you. It worked. Trick is to install all the curl components available from Synaptic manager
vadi - July 4, 2009 at 4:42 pm
Yep! Vadi. Said it right.
saffrongeek - July 4, 2009 at 6:28 pm
Yepp that it was
Emil Blume - September 1, 2009 at 9:26 pm
Thanks Emil for sharing your thoughts..
saffrongeek - September 2, 2009 at 8:04 am
Thanks for the little howto saved me from banging my head against the table trying to get my development enviroment online.
Affiliate Tools - October 9, 2009 at 8:51 pm
Hi ,
nice that post was of help.. Thanks for commenting
saffrongeek - October 10, 2009 at 8:36 am