Showing posts with label Multiphp. Show all posts
Showing posts with label Multiphp. Show all posts

Saturday, June 3, 2023

How To Install PHP (8.2, 8.1, 7.4,7.3) on Ubuntu 22.04

sudo apt update && sudo apt upgrade

sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https

LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php8.2

sudo apt install php8.1

sudo apt install php8.0

sudo apt install php7.4

sudo apt install php7.3

sudo apt install php5.6

apt-get install php*-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,xml,zip}

[If you use virtualmin then check PHP option to select your desired version]

Wednesday, February 22, 2023

Solved : Unable to guess the MIME type as no guessers are available (have you enabled the php_fileinfo extension?).

1. Image doesn't load correctly or shows broken
2. File (i.e: csv, xlsx etc.) will not be downloaded or cannot be exported

in WHM:
  1. Navigate to Software -> EasyApache4
  2. Click the button that says Customize next to Currently Installed Packages
  3. Click PHP Extensions
  4. Search for Fileinfo in the search bar and select the extensions you would like to install
  5. Click Review
  6. After looking over the proposed changes, scroll to the bottom of the screen and click provision.

In cPanel using PHP Selector (if not works even installed in WHM):

In cPanel using ini file (if not works even installed in WHM):

  1. Install PHP FIleInfo Extension (if not installed)
  2. Enable php_fileinfo in php.ini 
extension=php_fileinfo.dll (Windows) (Linux)

Tuesday, August 30, 2022

Install multiple PHP version on Ubuntu for Virtualmin

 Enable ondrej/php repository

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && apt-get update
Install additional PHP packages
apt-get install php*-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,xml,zip} 

Note: php* should be replaced with a specific PHP version, i.e. php7.4, unless you really need to install all available additional PHP versions.

Configuring the second PHP Version in Virtualmin

Once you have completed the installation of a second PHP version on your server, you can verify that Virtualmin sees it by logging into Virtualmin, and clicking System Settings → Re-Check Config. You should see something like this:
The following PHP execution modes are available : fpm
The following PHP-FPM versions are available : 8.0.13 (php-fpm) 7.4.30 (php74-php-fpm) 8.2.0 (php82-php-fpm) 

You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings → Server Templates → Default → PHP Options page.

Configuring Individual Virtual Servers

You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration → PHP Options.


How to merge a branch to main branch in Github.

In Terminal or Command Prompt:  git checkout main  [switch to main branch] git pull origin main  [grab latest updates from main branch] git ...