0

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

4
  • That error means you don't have the class in your file structure. It needs to be included with include('path/to/oauth.php'); Commented Mar 13, 2012 at 2:26
  • @Jon: I using windows OS, how to find library for oauth Commented Mar 13, 2012 at 2:34
  • @HaiTruongIT Did you solve your issue? Commented Oct 23, 2018 at 7:40
  • @Rathinam: yes, this issue has been solved Commented Oct 24, 2018 at 6:44

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

check here please, downloads.php.net/pierre try php_oauth-1.1.1-dev-5.3-vc9-x86.zip
1

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!

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.