Installing Pecl Oauth on MAMP OSX 10.6

Good, so after a day of mess with things like Fink, Macports, Pecl, etc. I managed to install the oauth.so module on OSX.

However, I use MAMP locally, which I think uses its own version (that is, in its own location) of PHP, and the module is installed on the main system version of PHP?

So, I launched the PECL version from the MAMP folders:

sudo /Applications/MAMP/bin/php5.2/bin/pecl install oauth

But it looks like it is still installed in the public folder

    ...
    Build process completed successfully
    Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/oauth.so'
    install ok: channel://pecl.php.net/oauth-1.0.0
    configuration option "php_ini" is not set to php.ini location
    You should add "extension=oauth.so" to php.ini

Pay attention to the folder / usr / lib / .... But php.ini MAMP uses, actually scans / Applications / MAMP / bin / php 5.2 / lib / php / extensions / no-debug-non-zts-20060613

I thought it would be as simple as just copying the .so file ... but that was too much.

- , php ?

0
3

MAMP 1.9.6 Mac OSX 10.7.4 .

MAP php /Applications/MAMP/logs/php_error.log

[22-Jul-2012 12:11:20] PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/oauth.so' - dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/oauth.so, 9): no suitable image found.  Did find:
        /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/oauth.so: mach-o, but wrong architecture in Unknown on line 0

:

  • http://pecl.php.net/package/oauth

    , , , :

  • tar xzvf oauth-1.1.0.tgz

  • cd oauth-1.2.2/oauth-1.2.2

  • phpize

  • sudo ./configure MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load"

    .. , Mac OSX TARGET .

  • sudo make

  • sudo make install

  • sudo cp /usr/lib/php/extensions/no-debug-non-zts-20090626/oauth.so /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/oauth.so

  • php.ini ( /Applications/MAMP/conf/php5.3/php.ini) :

    extension=oauth.so

  • MAMP. oauth MAMP PHPINFO.

+4

php_ini pecl php.ini MAMP. :

sudo /Applications/MAMP/bin/php5.2/bin/pecl config-set /Applications/MAMP/conf/php.ini

pecl php MAMP

0

PECL - , PHP. php.net/downloads.php, , , PHP. : PHP OAuth MAMP

0
source

All Articles