Install PHP Version (7.3, 7.2 or 7.0) on Ubuntu 19.04, 18.04 & 16.04 via PPA

Thanks to Ondřej Surý for maintaining PPA of most the popular PHP versions on launchpad. PHP 7.3 is the current & stable version of PHP. You can check the PHP Release History. PHP 7.3 has support till 6 December 2020. If you want to install the specific version of PHP, then this article can be helpful for you. In this article we will help you in installing PHP 7.3, 7.2 or 7.0 using PPA on Ubuntu 19.04 18.10 LTS, 18.04 LTS, 16.04 LTS, 14.04 LTS or 12.04 LTS systems. Install PHP 7.3 on Ubuntu 19.04, 18.04 & 16.04 PHP 7.3 is the current & stable version of PHP. Use the following set of commands that is installing software-properties-common and then …

Read More

Reset or Change MySQL root user Password on Ubuntu Linux

Today, in this article we will discuss How you can change / Reset / Set / Update MySQL root user’s password on Ubuntu Linux Server. Sometimes while playing with root user’s privileges to allow its access remotely may change its password. Or if you have forgotten the root user’s password. Then you can not access the MySQL DB without the password. In that case, you need to change/reset it’s MySQL password. Please follow these steps to reset/change the MySQL root user password. Stop The MySQL Server

Start The MySQLd Configuration And Skip The Grant Table This will start a new MySQL Server with no-password and it will ignore the Grant table rules. Now, This Temporary MySQL Server will have full control. …

Read More

Install LAMP AWS EC Ubuntu 16.04 – PHP 7, Apache, MySQL 5.7, GD, iMagick, Curl, MemCache

What is LAMP LAMP stands for: L = Linux as the operating system platform. A = Apache as the Web server M = MySQL as the database server P = PHP as the supportive language In this tutorial, we are going to see how to setup/install LAMP server on Ubuntu 14.x. This tutorial will cover the installation of PHP 7.0, Apache 2 & MySql 5.7, GD, iMagick, Curl, MemCache, Sqlite3, etc Instance Setup Install Apache2 Web Server

Verify: Install PHP 7

Restart Apache 2 Server To reflect changes in a server you need to restart the server. To restart server run the following command in SSH terminal window.

Check Installed PHP Version After successfully restart server run …

Read More
Ubuntu iMagick

How to install iMagick for PHP 7.x in Ubuntu 14 and above

Imagick is the most famous & best PHP extension for image manipulations. You can create and modify images using the iMagick (ImageMagick) library. It’s known on other platforms due to its difficult installation process, however in Ubuntu, installing it is pretty easy thanks to the php-imagick package that installs ImageMagick and Imagick as well. If you want to install Imagick on your server in just a couple of minutes, follow these steps: Install PHP Imagick To use Imagick with PHP 7.x in your server, you can easily achieve it with the following command:

The source of the package is the original package of Imagick from pecl. The installation takes about 1-2 minutes. You just need to press ‘Y’ each …

Read More
set default php version

Set Default PHP Version in Ubuntu

You can set the default PHP version to be used on the system with the “update-alternatives” command, after setting it, check the PHP version to confirm whether desired PHP version is set as default or not.

Restart apache server

Check PHP version

Output of above command is Check PHP configuration file You can find your PHP configuration file, by running the command below.

Output of above command is Now, check the current PHP version with phpinfo. Sometime you may see phpinfo() function shows older/different PHP version and SSH command line shows newer/different PHP version. To over come with this issue you need to disable unwanted PHP version and enable desired installed PHP version. Disable PHP5 module …

Read More

Install PHP 7.x GD Library on Ubuntu 14.x

PHP 7 do not come with GD library you need to install it manually. Depending on your current installed PHP version you may install GD library on Ubuntu. Install PHP 7.x (7.0, 7.1, 7.2, etc) GD library

Restart apache server

Now check phpinfo whether GD library is installed or not? Use bellow function in any file and open that file on browser.

Do browser search for GD. If you see “GD Support” is enabled. Then your GD library is successfully installed. Now you may use GD library for image manipulations.

Read More
mbstring extension missing php7 phpmyadmin

Install mbstring extension PHP 7 on ubuntu

Multibyte String (mbstring) extension in deprecated in PHP 7 and above. If you are using PHP 7 & above and you want to access phpMyAdmin. You may face an error i.e. “The mbstring extension is missing. Please check your PHP configuration.” Install mbstring extension PHP 7.x on ubuntu

Restart apache server

Cheers! mbstring extension is installed and auto configured now you can access phpMyAdmin.

Read More
Could not instantiate mail function - PHPMailer

Could not instantiate mail function – PHPMailer

If you are using PHPMailer just to send mail and you are not using isSMTP() then PHPMailer uses PHP’s mail() function. If your server does not support PHP mail() function. Then PHPMailer will throw Fetal Error. And this error is well defined on PHPMailer Github Documentation. PHPMailer without isSMTP() not working? This means that your PHP installation is not configured to call the mail() function correctly (e.g. sendmail_path is not set correctly in your php.ini), or you have no local mail server installed and configured. To fix this you need to do one or more of these things: Install a local mail server (e.g. postfix). Ensure that your sendmail_path points at the sendmail binary (usually /usr/sbin/sendmail) in your php.ini. Note …

Read More
php mail

Enable PHP mail() function on Ubuntu Server

PHP mail() function does not come with default installation of AWS EC Ubuntu Server. You need to install “sendmail” package to enable PHP mail() function on Ubuntu Server. This is a short guide covers how to enable the mail() function in PHP on Ubuntu Server. Here are the steps I took to get “mail()” working on my Ubuntu Server. Step 1: Install sendmail The first thing you need to do is install the “sendmail” package. Do this by running the following command in your terminal:

Sendmail might already be installed, but just in case, enter above into your terminal: Step 2: Configure sendmail package After successful installation of “sendmail” package, you need to configure it. You can do that by running the …

Read More
Install Git, Composer, PhpMyAdmin, Zip

Install Git, Composer, PhpMyAdmin, Zip/UnZip, Enable mod_rewrite on AWS EC Ubuntu

In this tutorial, we are going to see how to install latest packages/modules on Ubuntu server i.e. Git, Composer, PhpMyAdmin, Zip/UnZip, Enable mod_rewrite. In a previous tutorial, we have seen how to install LAMP AWS EC Ubuntu 14 – PHP 7, Apache 2, MySql 5.7 Git Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. To Install Git on your Ubuntu server run following command in SSH terminal.

Composer Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Run the following command on SSH …

Read More