在 MAMP 环境中安装 PHP OAuth

2021-12-31 00:00:00 oauth php mamp

我已经尝试按照所有关于在 MAMP 环境下安装 PHP OAuth 扩展的教程进行操作,但由于某种原因无法加载它.

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.

我使用 MAMP 1.9 和 PHP 5.3.2

I am using MAMP 1.9 with PHP 5.3.2

我最近的教程是: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?

谢谢!丹尼斯

推荐答案

升级到 MAMP 2.0 for PHP 5.2.17 后,我按照以下步骤安装了 >oauth 模块通过 pecl

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

  1. 下载MAMP 服务器组件和库 特别是您需要 php-5.2.17.tar.gz
  2. 将 php-5.2.17.tar.gz 解压到/Applications/MAMP/bin/php/php5.2.17/include/php
  3. 针对下载的 php 运行配置.不要构建它.

  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

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

删除损坏的梨配置:

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

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

编译 oauth

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

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

更新 php.ini 并添加 extension=oauth.so 这可以在 MAMP 中的 File -> Edit Template -> PHP -> PHP 5.2.17 php.ini 下完成

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

相关文章