Warning: Use of undefined constant OAUTH_REQENGINE_CURL

On an Ubuntu server (Ubuntu 20.04.2 LTS) when running a PHP script, I get the following error.

On checking phpinfo, I get

Ubuntu PHP OAuth

curl is missing in “Request engine support”.

This is because the default php-oauth package does not support curl. To fix, uninstall php-oauth and install oauth package using pecl.

Uninstall pcel

install curl dev package

Install PHP PECL

Install oAuth

Edit php.ini file

Add at end of the file

You need to do the same for Apache and php-fpm php.ini files located at

7.4 is for PHP version 7.4. Change this to whatever PHP version you have on your server. After making the change, phpinfo() page shows curl

ubuntu php oauth

See php

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *