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

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.

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

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制