5

I have tried following ALL tutorials out there on getting PHP OAuth extension installed under the MAMP environment, but can't get it to load for some reason.

I am using MAMP 1.9 with PHP 5.3.2

The most recent tutorial I was following was: http://lifeofadev.com/2011/03/09/mac-os-x-installing-oauth-so-into-xampp-mamp/

Does anyone else have experience with getting this to work?

Thanks! Dennis

1
  • If you are using MAMP PRO, it looks like adding OAuth to PHP can now be done via checking the "OAuth" option in PHP language extensions. See: documentation.mamp.info/en/MAMP-PRO-Mac/Languages/PHP/… Not sure what version this was added, but I'm using MAMP PRO 6.4. Commented May 7, 2022 at 9:34

3 Answers 3

17

After upgrading to MAMP 2.0 for PHP 5.2.17 I followed these steps to install the oauth module through pecl

  1. Download MAMP Server components and libraries Specifically you want php-5.2.17.tar.gz
  2. Uncompress php-5.2.17.tar.gz to /Applications/MAMP/bin/php/php5.2.17/include/php
  3. Run configure against the downloaded php. Do not build it.

    cd /Applications/MAMP/bin/php/php5.2.17/include/php; ./configure

  4. Remove broken pear config:

    mv /Applications/MAMP/bin/php/php5.2.17/conf/pear.conf /Applications/MAMP/bin/php/php5.2.17/conf/pear.conf.bak

  5. Compile oauth

    cd /Applications/MAMP/bin/php/php5.2.17/bin; ./pecl install oauth

  6. Update php.ini and add extension=oauth.so This can be done in MAMP under File -> Edit Template -> PHP -> PHP 5.2.17 php.ini

Sign up to request clarification or add additional context in comments.

3 Comments

This worked perfectly for me :D You're awsome! Followed step by step. The include folder didn't exist so i created it. Moved all the contents of the php-5.2.17 folder from the dmg I downloaded to the include folder and the rest was copy/paste. Thanks!
I followed all the steps until step 3. but then terminal says: "zsh: no such file or directory: ./configure" What do I need to do?
I'm tripping up at step 5, /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found
2

For MAMP 3:

  1. Download and install OAuth.

    sudo pecl install oauth
    
  2. Then, go to MAMP, and click on File > Edit Template > PHP > PHP 5.x.x php.ini and add the following line

    extension = oauth.so
    

    Make sure to choose the current running php version (or press CMD+4 to edit MAMP's running php.ini file).

  3. Restart MAMP servers.

Comments

1

Since MAMP 3.0 sources are hard to find but you can download sources from PHP.net, make sure the version match : http://php.net/downloads.php, then follow Ryan instructions.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.