Warning: Use of undefined constant OAUTH_REQENGINE_CURL

Ubuntu PHP OAuth

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

On checking phpinfo, I get

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

[…]

Read More…

Install PHP drivers for Microsoft SQL Server on Ubuntu PHP 7.2

On Ubuntu 18.04 server running PHP 7.2, i want to install Microsoft SQL Server module for PHP. You can find PHP module for SQL server at https://github.com/microsoft/msphpsql At the time of writing this PHP module only support PHP 7.4 and newer. SO i need to find older version that supported PHP 7.2. On checking release […]

Read More…

Redirect a site to www using PHP

To redirect a site to url with www using PHP, you can use following PHP code

Add this code in your index.php file or another file included by index.php See Redirect […]

Read More…

Install PHP 5.6 on CentOS 7

To install PHP 5.6 on CentOS 7, enable EPEL repo and remi repo

Install yum-utils and enable remi-php56 repo

Install PHP 5.6 with

[…]

Read More…

HTTP 301 Redirect using PHP

php programming

You can use PHP header() function to do redirect. To do 301 redirect, use

For 302 redirect, use

If you need to redirect a site to new site keeping same URL structure, you can use

[…]

Read More…

CloudLinux PHP Selector on Cpanel Server

CloudLinux come with PHP Selector, this allow you to select differnt PHP versions. When you enable PHP selector, you should do the following.

Related Posts Enable CloudLinux PHP lsapi CloudLinux […]

Read More…

CentOS 7 VestaCP Upgrade PHP to 7.x

On CentOS 7 VestaCP install PHP 5.6 by default. This is very old version of PHP. To upgrade PHP to latest version 7.x, you can install remi repo. Install EPEL repo

Install yum-utils

Install remi repo

Select PHP version you need

Here i selected PHP 7.3. You can select differnt PHP […]

Read More…