Can't Install libcurl PHP on Ubuntu Linux


Can't Install libcurl PHP on Ubuntu Linux



I am trying to use the new facebook api and it requires libcurl PHP. I used

sudo apt-get install php5-curl sudo apachectl -k restart 

And it didn't work. I get the same error and the phpinfo() page says nothing about libcurl.

The source of this problem is probably that I built some of the tools from source (apache2, php), but then I got bored so installed a lot of the extensions with the package manager. But I'm not exactly how to go about diagnosing the point of failure.

The apt-get install for curl definitely worked, and can be found in

/usr/lib/php5/20060613/curl.so

I think a lot of my confusion stems from not knowing which files go where, and what purpose they have. Any help would be appreciated, and please tell me if I need to provide more information.

edit: The specific error I get is:

Exception: Facebook needs the CURL PHP extension. 

from line

if (!function_exists('curl_init')) {   throw new Exception('Facebook needs the CURL PHP extension.'); } 

Ubuntu: 9.10

PHP: 5.2.13

Loaded Configuration File: /etc/php5/apache2/php.ini


How to send a EML file as email using python script to list of emails one at a time?

1:

How to retrieve value from etc/sysconfig in Python
In universalit's a bad idea to mix and match software from your distrialthough ion's package manager with stuff you've built yourself. Displaying an image from the tmp directoryThe package manager will not know anything around the stuff you've built yourself and so must receive confused.. How do they read clusters/cylinders/sectors from the disk? Not only this although who's to say the stuff from the package manager is even binary compatible with the stuff you've built yourself? If you build it all yourself then at least you know it will all be compatible.. Use OpenBSD's malloc, realloc and free in my program Sounds to me like you should uninstall the extensions and build them yourself. Strange results while measuring delta time on LinuxIf you can't or don't want to did this then go back and install apache and friends through your package manager although I would recommend having patience and going for the former option.. Java OutOfMemoryError due to Linux RAM disk cache not freed
Spring ResourceServlet throws too many open files exception in jetty and tomcat under linux

2:

Answer of Questions. What version of Ubuntu?. What version of PHP?. How is Apache and PHP set up?. What ini files does phpinfo() say is parsed? (should be near the top).

3:

Perhaps apt break down to properly modify your php.ini file to load the curl extension?. Check out your php.ini and see if you have line like:.
extension=curl.so 
or maybe:.
extension=/usr/lib/php5/20060613/curl.so 

4:

To check if php-curl is installed please follow these steps:

  1. Create a file in your web server (in Ubuntu it would be in /var/www folder), name it info.php
  2. Open this file and type this command:.
    <?php phpinfo(); ?> 
  3. Save this file.
  4. Open your favorite browser and open this file (ex: http://localhost/info.php)
  5. Now you will see the Information around 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 these steps:

  1. Open your terminal and type this command:.
    sudid  apt-receive  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
Source: http://www.ivankristianto.com/os/ubuntu/howto-install-curl-in-php-apache/379/.


60 out of 100 based on 35 user ratings 470 reviews