Knowledge Base

308 copy-ready commands with fill-in variables, plus step-by-step installation guides.

Installation Guides 11

Categories

Installation Guides (11)

Tags

8 results

PHP

Add Ondrej PHP repository (multi-version PHP)

sudo add-apt-repository ppa:ondrej/php -y && sudo apt update
#php #repository
3 views 0 copies
PHP

Install PHP with common extensions

sudo apt install -y php{{php_version}} libapache2-mod-php{{php_version}} php{{ph...
#php #install
3 views 0 copies
PHP

Switch Apache from mod_php to PHP-FPM

sudo a2dismod php{{php_version}}
#php #php-fpm
3 views 0 copies
PHP

Create PHP info test page

echo '<?php phpinfo(); ?>' | sudo tee {{web_root}}/info.php
#php #testing
3 views 0 copies
PHP

Install Composer globally

curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/l...
#php #composer
3 views 0 copies
PHP

Install PHP Extension

apt install php{{version}}-{{extension}} -y
#php #extension
3 views 0 copies
PHP

Reload PHP-FPM

systemctl reload php{{version}}-fpm
#php #fpm
4 views 0 copies
PHP

Check PHP Configuration Value

php{{version}} -r "echo ini_get('{{directive}}');"
#php #ini
3 views 0 copies