0

I'm trying to install the pecl oauth package with PHP 7.2 and don't know what I'm doing wrong. I ran this:

sudo pecl install oauth

and it seemed to work. It said this:

Build process completed successfully
Installing '/usr/lib/php/20151012/oauth.so'
install ok: channel://pecl.php.net/oauth-2.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=oauth.so" to php.ini

I opened my php.ini file and tried all of these:

extension=oauth.so
extension=oauth
extension=/usr/lib/php/20151012/oauth.so

I restarted apache each time.

I ran php -m, phpinfo(), and get_loaded_extensions() each time and oauth doesn't show up.

I noticed this in the phpinfo():

extension_dir=/usr/lib/php/20170718

but pecl installed oauth into

/usr/lib/php/20151012

Could that be the problem? If so, why would pecl install it into a different folder? Could I just move the oauth.so file into the 20170718 folder?

raphael75
  • 133
  • 2
  • 10
  • 1
    Is there a reason you want this extension? There are much better ways of implementing OAuth these days. The PECL extension hasn't had an update for years now. – ceejayoz Apr 11 '18 at 18:27
  • 1
    It smells like you have multiple versions of PHP installed on the system. You should remove all except the one you actually want. – Michael Hampton Apr 11 '18 at 18:30
  • @ceejayoz Do you know if the pecl extension supports oauth2? If not then it won't work for what we need. – raphael75 Apr 11 '18 at 19:24
  • 1
    @raphael75 No idea. I'd strongly urge you to use a maintained package for this. https://oauth2.thephpleague.com/ is a good one. – ceejayoz Apr 11 '18 at 19:33

0 Answers0