Fatal error: Class 'OAuth' not found in

前端 未结 4 1734
别跟我提以往
别跟我提以往 2021-02-08 03:28

I\'m trying to connect to the LinkedIn API but everytime I try to access it I get the following error:

Fatal error: Class \'OAuth\' not found in /home/vh

4条回答
  •  无人共我
    2021-02-08 03:57

    For php 5.6... First the disclaimer: you need to migrate to the latest stable php 7 ASAP and not run php 5.6! But if that's just not possible quite yet, this might help Ubuntu 16.04 users. This assumes you have the ondrej/php ppa.

    sudo apt-get update
    sudo apt-get install libpcre3-dev
    sudo apt-get install php-pear            # * see note below 
    sudo apt-get install php5.6-dev          # for phpize
    sudo pecl install oauth-1.2.3
    
    # now add "extension=oauth.so" (sans quotes) to the 
    # "Dynamic Extensions" area in /etc/php/5.6/apache2/php.ini
    

    * Per this post https://askubuntu.com/a/756186/343695 "php-pear pull[s] just CLI PHP 7.0 (php7.0-cli) and that's harmless" That comment was made in 2016 and may no longer be true. I didn't see any problems...yet.

提交回复
热议问题