Question: 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

Answer: 
I like Craig Larman's [Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition)](https://rads.stackoverflow.com/amzn/click/com/0131489062). Most PHP programmers would do well to learn habits like design patterns and GRASP.

You could also "keep it in the family" and read the free online book [Building Skills in Object-Oriented Design](http://www.itmaybeahack.com/homepage/books/oodesign.html) by Stack Overflow top-ten scorer [Steven Lott](https://stackoverflow.com/users/10661/s-lott).
I've had The [*Object-Oriented Thought Process*](http://www.informit.com/store/product.aspx?isbn=9780672326110&rll=1) on my wishlist for a few months, but I haven't got my hands on it yet. The reviews and snippets I've seen are positive, though. You'd need to supplement it with language-specific details from the PHP reference on [Classes and Objects](http://php.net/manual/en/language.oop5.php), but I think most of the fundamentals should translate well enough, provided you can port the examples.

Edit: Oops. If you're looking for something more advanced, I've also got these two on my list:

* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.informit.com/store/product.aspx?isbn=0201633612&rll=1)
* [Patterns of Enterprise Application Architecture](https://rads.stackoverflow.com/amzn/click/com/0321127420)