user1558646 user1558646 - 1 year ago 300
PHP Question

Installing OAuth PECL package on PHP 5 on OS X

I'm trying to install the OAuth PECL package, and I'm using PHP 5.

When I run the install command, I get the error below that I must have PHP version 7.0.

Upgrading to PHP 7 is not an option right now, so how do I get the OAuth package installed for PHP 5?

chris$ sudo pecl install oauth
pecl/oauth requires PHP (version >= 7.0.0), installed version is 5.5.29
No valid packages found
install failed

Answer Source

It seems like the dependencies are messed up for Version 2.0.0 of oauth. You can install the previous version like this:

sudo pecl install oauth-1.2.3

I also filed an issue on their GitHub project on your behalf (here), as this seems to be an unintentional bug.

In package.xml, we have:


  <!-- ... -->


Looks like there's some news from the bug report. Indeed, version 2.0.0 only supports PHP7 and the changelog was unclear. The maintainer of oauth has filed a bug against PECL to install the latest compatible version. So, yes, you're stuck with 1.2.3 and the instructions above are correct.

Edit Again

It looks like PECL won't be fixing this any time soon, so we're stuck installing the specific version :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download