cosmocode / dokuwiki-plugin-oauth

Generic oAuth1 and oAuth2 plugin for DokuWiki
http://www.dokuwiki.org/plugin:oauth
30 stars 78 forks source link

Some Linux distros may require installing PHP JSON package in order for the oauth plugin to work #60

Closed mhenry07 closed 2 years ago

mhenry07 commented 6 years ago

It may be helpful to add a troubleshooting tip to the README.md that some Linux distributions may require manually installing a PHP JSON package in order for this plugin to work.

For example, with Alpine Linux in Docker with PHP 5, I was getting an HTTP 500 error and the following entry in my Nginx error log when trying to log in using the oauth plugin:

[error] 56#56: *148 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined function OAuth\OAuth2\Service\json_decode() in /var/www/html/lib/plugins/oauth/phpoauthlib/src/OAuth/OAuth2/Service/Generic.php on line 80" while reading response header from upstream.

To resolve the issue, I had to install php5-json via apk add --no-cache php5-json.

See also vimagick/dockerfiles#66