Hai Truong IT
Hai Truong IT

Reputation: 4187

Error Fatal error: Class 'Oauth' not found when using OAuth

I using code demo from link http://djpate.com

When I run http://localhost:8080/test/OAuthProviderExample/client/index.php is it get error Fatal error: Class 'Oauth' not found in C:\wamp\www\test\OAuthProviderExample\client\index.php on line 2

in client/index.php i using:

$oauth_client = new Oauth("key","secret"); // line 2
$oauth_client->enableDebug();

How to fix it, i using wampserver in windows 7

Upvotes: 0

Views: 11503

Answers (3)

user3572358
user3572358

Reputation:

I had this same problem. I think wamp installs using win32 bits by default. Even if you are running windows 64bit OS. So download the 86x version here For PHP version 5.5 .
Extract the Zip file and copy the php_oauth.dll found in your extract to C:\wamp\bin\php\php5.5.12\ext Click on your wamp server, goto PHP>php.ini, add thisextension=php_oauth.dll to a place where you find similar text or anywhere. Now exit your wamp server. Start it up again and in PHP>PHP extensions you should see php_oauth ticked. However, if you still encounter problems goto PHP error logto get a clue. Cheers!

Upvotes: 1

ajameswolf
ajameswolf

Reputation: 1660

Oauth for PHP 5.4 Windows x86

PHP/5.4.7 http://zahymaka.com/314/php-5-4-oauth-x86-windows

This is not my source so im not sure how stable ,but it was the only option I've found after about an hour and a half of searching.

Throw the file into your php/ext folder

Edit your php.ini to include the extension

extension=php_oauth.dll

Upvotes: 0

Jinzhao Huo
Jinzhao Huo

Reputation: 857

remember there's one step in the tutorial:

sudo pecl install oauth

This is installing the oauth lib, in Windows OS it should be "oauth.dll" liked file, check where to get the lib file for Windows. and see if the problem solved.

Upvotes: 1

Related Questions