title: "PHP Fatal error: Class 'HttpRequest' not found"
body: <p>I've been stuck trying to solve this problem in many ways, reading a lot of posts but still having no luck.
  I work on a Mac, OSX 10.7 Lion, and I'm writing a plugin for a WordPress site (php files) using MAMP, and at one point I have to make an HTTP request:</p>
  
  <pre><code>$request = new HttpRequest('something'); 
  $request-&gt;setMethod(HTTP_METH_GET);
  </code></pre>
  
  <p>There's an error when executing this request and when I checked the log file, here's the message:</p>
  
  <pre><code>"PHP Fatal error:  Class 'HttpRequest' not found in (the_php_file)"
  </code></pre>
  
  <p>I've already installed PEAR, PECL and the HTTP extension (pecl_http), Xcode and its command line tools. 
  This is what I did:</p>
  
  <ul>
  <li><p>modified the PATH:</p>
  
  <pre><code>$ echo "export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH" &gt;&gt; ~/.profile`
  </code></pre></li>
  <li><p>verified that the paths for php, pear and pecl are correct:</p>
  
  <ul>
  <li>/Applications/MAMP/bin/php/php5.3.6/bin/php  is the path for php</li>
  <li>/Applications/MAMP/bin/php/php5.3.6/bin/pear for pear</li>
  <li>/Applications/MAMP/bin/php/php5.3.6/bin/pecl for pecl</li>
  </ul></li>
  <li><p>I downloaded the source for php from the MAMP page (and checked that the version I  downloaded was the same one I'm using, which is php5.5.3). Then I extracted the content and put it into /Applications/MAMP/bin/php/php5.5.3/include/php</p></li>
  <li>Inside /Applications/MAMP/bin/php/php5.5.3/include/php I ran <code>./configure</code></li>
  <li>I executed: <code>pecl install pecl_http</code></li>
  <li><p>I also added these extensions to the php.ini (initially, I modified the  MAMP/bin/php/php5.5.3/conf/php.ini file):</p>
  
  <pre><code>extension=raphf.so
  extension=propro.so
  extension="http.so"
  </code></pre></li>
  </ul>
  
  <p>About that last one in quotation marks: when I added the extension manually, I did it like this: <code>extension=http.so</code>. Then (when trying to fix my problem) I tried an alternative installation that modified the php.ini automatically, and wrote the extension with the quot. marks, but the result was still the same, so it didn't make a difference.</p>
  
  <p>After all of this, I stopped the MAMP server and started it again, but when I executed the php  I still got the error (visible in the php_error.log):</p>
  
  <pre><code>PHP Fatal error:  Class 'HttpRequest' not found
  </code></pre>
  
  <p>I've been following this guide mostly, among so many more:
  <a href="http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion">http://www.lullabot.com/blog/article/installing-php-pear-and-pecl-extensions-mamp-mac-os-x-107-lion</a></p>
  
  <p>I'd appreciate any idea because I've run out of them.</p>