Fatal error: Class 'OAuth' not found - Magento REST API (Install Oauth)

Ivo Danic

Active Member
Dec 1, 2015
29
0
1
México
cPanel Access Level
Root Administrator
Im trying to use the magento rest api, but when i load a simple script (php) apears an error, that says: "Fatal error: Class 'OAuth' not found" So i try to install the extension but when i run "pecl install oauth" the following message apears ->

Code:
pecl/oauth requires PHP (version >= 7.0.0), installed version is 5.5.31
No valid packages found
install failed
The oauth.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20121212
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes
Thanks for the help! : )
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,211
363
Hello :)

You can install the older version that supports PHP 5.5 via the following command:

Code:
pecl install https://pecl.php.net/get/oauth-1.2.3.tgz
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,211
363
Check to see if the issue persists after installing the "pcre-devel" package:

Code:
yum install pcre-devel
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,211
363
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.