Enabling CURL on Ubuntu 11.10

Posted by Afsheen Khosravian on Server Fault See other posts from Server Fault or by Afsheen Khosravian
Published on 2011-12-30T03:31:56Z Indexed on 2012/04/13 17:33 UTC
Read the original article Hit count: 327

Filed under:
|
|

I have installed curl:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

and I have updated my php.ini file to include(I also tried .so):

extension=php_curl.dll

To test if curl is working I created a file called testCurl.php which contains the following:

<?php
echo ‘<pre>’;
var_dump(curl_version());
echo ‘</pre>’;
?>

When I navigate to localhost/testCurl.php I get an error: HTTP Error 500

Heres a snippet from the error log:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/php_curl.dll' - /usr/lib/php5/20090626+lfs/php_curl.dll: cannot op$

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open sha$

[Sun Dec 25 12:10:17 2011] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.3 with Suhosin-Patch configured -- resuming normal operations

[Sun Dec 25 12:13:46 2011] [error] [client 127.0.0.1] File does not exist: /var/www/css, referer: http://localhost/

[Sun Dec 25 12:13:46 2011] [error] [client 127.0.0.1] File does not exist: /var/www/css, referer: http://localhost/

[Sun Dec 25 12:13:46 2011] [error] [client 127.0.0.1] File does not exist: /var/www/css, referer: http://localhost/

[Sun Dec 25 12:13:46 2011] [error] [client 127.0.0.1] File does not exist: /var/www/css, referer: http://localhost/`

Can anyone help me to get curl working?

The problem was with the original test code. I used a new test file containing this and curl is now working:

<?php 
## Test if cURL is working ## 
## SCRIPT BY WWW.WEBUNE.COM (please do not remove)## 
echo '<pre>'; 
var_dump(curl_version()); 
echo '</pre>'; 
?>

© Server Fault or respective owner

Related posts about ubuntu

Related posts about php