1. Debian 11.0
1.1. PHP 7.4
1.1.1. Installation
sudo apt-get install php
php --version
php --modules
sudo service apache2 restart
2. Linux
2.1. PHP 8
2.1.1. Installation
sudo apt update
sudo apt install apt-transport-https ca-certificates gnupg lsb-release wget
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
wget https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg
rm apt.gpg
sudo apt update
sudo apt upgrade
sudo apt install php8.0
php --version
php --modules
sudo service apache2 restart
2.1.2. Configuration
-
Contents of the /var/www/html/phpinfo.php file.
<?php print_r (phpinfo()); ?>
-
Browse to http://localhost/phpinfo.php.
2.1.3. ANC Application
sudo apt-get install php8.0-pgsql
sudo apt-get install php8.0-gd
sudo apt-get install php-ssh2
-
Contents of the /etc/php/8.0/apache2/conf.d/smru-php.ini file.
date.timezone = "Asia/Bangkok" short_open_tag = On #error_reporting = E_ALL | E_STRICT error_reporting = 0
sudo service apache2 restart
3. Windows
3.1. PHP5
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP. If you are using PHP with IIS you should use the VC9 versions of PHP.
VC6 x86 Non Thread Safe versions:
php-5.2.17-nts-Win32-VC6-x86.msi
sha1: 2145f6adf72ab5f9a067c52163c6b1c18c47eedd
Thread Safe versions:
php-5.2.17-Win32-VC6-x86.msi
sha1: 710a69733aa280f22c86e8b868c51f5796f0a390