By Igor Garcia
How can I install it on my server?
PHP >= 7.1.3 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP Extension Ctype PHP Extension JSON PHP Extension BCMath PHP Extension
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
I think that this would work for you:
First make sure to run apt updage:
apt-get update
Then run the follwoing to install your PHP modules:
apt-get install php7.2 php7.2-curl php7.2-dev php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml php-token-stream php7.2-json
Hope that this helps! Bobby
To install PHP and the required PHP extensions on your server, you’ll need to follow specific steps depending on the operating system of your server. Below, I’ll provide guidance for installing PHP and the necessary extensions on both Ubuntu (commonly used with Debian as well) and CentOS, two of the most popular Linux distributions for web servers.
sudo apt update
sudo apt upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.0
sudo apt install php8.0-cli php8.0-fpm php8.0-mbstring php8.0-xml php8.0-bcmath php8.0-json php8.0-pdo php8.0-tokenizer php8.0-ctype php8.0-openssl
Check Installation Verify that PHP and its extensions are installed correctly:
php -v
php -m
sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi-php80
Install PHP and Extensions Now, install PHP 8.0 and the necessary extensions:
sudo yum install php php-cli php-fpm php-mbstring php-xml php-bcmath php-json php-pdo php-tokenizer php-ctype
Configure PHP-FPM for use with your web server (either Apache or Nginx):
libapache2-mod-php (for Ubuntu) or mod_php (for CentOS).Adjust PHP Settings in php.ini (located usually in /etc/php/8.0/cli/php.ini for CLI and /etc/php/8.0/fpm/php.ini for FPM):
upload_max_filesize, post_max_size, memory_limit, and max_execution_time as per your application requirements.Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.