Fatal error: Class 'OAuth' not found in

Asked
Active3 hr before
Viewed126 times

6 Answers

classerror
90%

OAuth is a PECL extension it must be compiled into PHP or compiled as an extension.,Update: Use https://github.com/Lusitanian/PHPoAuthLib instead of a PECL.,Connect and share knowledge within a single location that is structured and easy to search.,Most servers will not have it by default since it really is not something everyone would likely use. You can ask your host to either install it or if you have the ability compile it on server if using CGI as I did. If you run phpinfo(); and look for the word OAuth it will show up if you have it, otherwise you don't.

sudo apt - get update
sudo apt - get install php - oauth
sudo service apache2 restart
load more v
88%

This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register. By continuing to use this site, you are consenting to our use of cookies. Accept Learn more… ,Shop our Products Product OverviewFeaturesAdd-onsCustomize cPanelPricingReleasesFree Trial

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 / 3 rdparty / php / 54 / etc / php.ini...
   No changes
load more v
72%

PHP Fatal error: Class 'OAuth' not found in /home/twitter/TwitterAutoReply.php on line 22,I searched the site for hours looking for answer and nothing helped me. I’ve installed PHP/Apache2/PECL/OAuth and edited php.ini for extension=oauth. I get this error everything I type "php example.php" I'd set the token and everything required in example.php,My php files is example.php and TwitterAutoReply.php,Restart apache and try again.

From the error, you're not importing the oauth package in you php.ini file. For ubuntu, you need to install oauth:

sudo pecl install oauth

Then include the oauth package in your php.ini. If you don't know where the file is, you can use:

sudo find / -name "oauth.so"

Using the path to the extension add the following to your php.ini:

extension = /path/to / oauth / package / oauth.so
load more v
65%

You just have to add the following line in your checklogin.php,You can place the OauthClient.php along with the other three files in your application.,Where should I place the OauthClient.php file?,As the doc says in checklogin.php, there is

You just have to add the following line in your checklogin.php

require 'OauthClient.php';
75%

PHP Fatal error: Class 'OAuth' not found in /home/twitter/TwitterAutoReply.php on line 22,I searched the site for hours looking for answer and nothing helped me. I’ve installed PHP/Apache2/PECL/OAuth and edited php.ini for extension=oauth. I get this error everything I type "php example.php" I'd set the token and everything required in example.php,My php files is example.php and TwitterAutoReply.php,That is why you are getting an "401 unauthorized" error on the second time as the token is no longer valid.

From the error, you're not importing the oauth package in you php.ini file. For ubuntu, you need to install oauth:

sudo pecl install oauth

Then include the oauth package in your php.ini. If you don't know where the file is, you can use:

sudo find / -name "oauth.so"

Using the path to the extension add the following to your php.ini:

extension = /path/to / oauth / package / oauth.so
load more v
40%

PHP Fatal error: Class 'OAuth' not found in /home/twitter/TwitterAutoReply.php on line 22,I searched the site for hours looking for answer and nothing helped me. I’ve installed PHP/Apache2/PECL/OAuth and edited php.ini for extension=oauth. I get this error everything I type "php example.php" I'd set the token and everything required in example.php,My php files is example.php and TwitterAutoReply.php,I have installed pecl_http on a PLESK server (which seems to be successful) but for some reason, the http extension will not load into PHP. gives me bool(false)...

From the error, you're not importing the oauth package in you php.ini file. For ubuntu, you need to install oauth:

sudo pecl install oauth
load more v

Other "class-error" queries related to "Fatal error: Class 'OAuth' not found in"