在 MAMP 环境中安装 PHP OAuth

2023-07-16php开发问题
7

本文介绍了在 MAMP 环境中安装 PHP OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我已经尝试按照所有关于在 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

这篇关于在 MAMP 环境中安装 PHP OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17