doulian8554 2016-10-12 06:12
浏览 43
已采纳

Magento我如何在灯服务器上提供oAuth? (Ubuntu Os)

I'm using Magento 1.9.2.4 and local lamp server on ubuntu.İ want to Create a simple product as an Admin user with OAuth authentication. i also generated consumer key and consumer secret key but i cant install oauth on lamp server.

My Codes are in this link->

http://devdocs.magento.com/guides/m1x/api/rest/introduction.html But i'm taking error because i haven't got api folder in magento file. i dont have also auth/token file.

My Error occurs like this->

"Fatal error: Class 'OAuth' not found in /opt/lampp/htdocs/Example1/index.php on line 36"

Error code is here ->

$oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType); 

Do I need library of auth.php for Oauth class?

  • 写回答

1条回答 默认 最新

  • dongpo5264 2016-10-12 09:59
    关注

    In your http://localhost/, go to php info() and search for oauth. If it is not there, try the below things,

    install oauth for specifiv php version

    sudo apt-get install php-pear php5-dev for php 5.* versions or

    apt-get install php5-dev libpcre-dev
    
    sudo /opt/lampp/bin/pecl install oauth-1.2.3
    

    in php.ini file add the line

    extension=oauth.so

    then restart the server and search again for oauth.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?