logo-composer-transparent

Today, I was needing to use the Tumblr API which PHP class uses the php-oauth extension.
So, before I could get started with Tumblr itself, I had to set a few tings up :

Install Pear :

1
2
3
curl -O http://pear.php.net/go-pear.phar

sudo php -d detect_unicode=0 go-pear.phar

Once the pear install script starts, I decided to place pear in /usr/local/pear so

1
2
3
4
5
6
7
8
9
Press 1

Enter /usr/local/pear

Press 4

Enter /usr/local/bin

Press return to finish Install

Thanks to this blog post by Jason McCreary for getting me this far.

Validate it all works typing pear version.

 

Now, using Pecl, install the oauth-extension :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
sudo pecl install pecl_http

sudo pecl install oauth

# Install failed as I was missing pcre

brew install pcre

# or

sudo port install autoconf

sudo port install pcre

sudo cp /opt/local/include/pcre.h /usr/include/

# Again

sudo pecl install oauth

# Edit php.ini and add

extension=http.so

extension=oauth.so

# Restart Apache

sudo apachectl restart

 

The Tumblr API requires a couple of other PHP packages and uses Composer so, after hearing about Composer for many months, I decided to get going with that, too.

1
2
3
curl -sS https://getcomposer.org/installer | php

mv composer.phar /usr/local/bin/composer

 

All the prerequisites in place, back to the tumblr project

Filed under: Mac OS X, PHP

Tagged with: , , , , , , ,

Liked this page?

Tweet it

Subscribe to the RSS feed or sign up for the newsletter now.

Posts related to Pear, pecl and php-oauth on OS X

Name (required)

Email (required)

Website

Leave a Reply

  • About Me


    photo of Samantha Halfon Samantha Halfon
    Software Engineer
    blueKiwi software
    Paris, France
    I enjoy playing with my computer(s), listening to Bob Dylan (and related artists) and watching movies (especially if they were directed by Martin Scorsese or John Cassavetes). Sometimes, I play a little guitar... If not doing any of the above, I am either riding a small red bike around Paris, or, making videos. About my videomaking please check out World Wide Angle and its blog.