PHP: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
=Installation= | =Installation= | ||
==Generic== | ==Linux== | ||
===Generic=== | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring | yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring | ||
Line 23: | Line 24: | ||
: The PHP installation command assumes we are going to use MySQL (or MariaDB). Update accordingly if using a different database. | : The PHP installation command assumes we are going to use MySQL (or MariaDB). Update accordingly if using a different database. | ||
==Installing PHP 7.3 on Centos 7== | ===Installing PHP 7.3 on Centos 7=== | ||
{{External|https://linuxize.com/post/install-php-7-on-centos-7/#installing-php-73-on-centos-7}} | {{External|https://linuxize.com/post/install-php-7-on-centos-7/#installing-php-73-on-centos-7}} | ||
Line 33: | Line 34: | ||
sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring | sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Mac== | |||
<syntaxhighlight lang='bash'> | |||
brew install php | |||
</syntaxhighlight > | |||
=Upgrade= | =Upgrade= |
Revision as of 02:52, 25 December 2023
Overview
Get Version
php -v
Locate the php.ini File
php -i
...
Configuration File (php.ini) Path => /etc
...
Installation
Linux
Generic
yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring
Note
- The PHP installation command assumes we are going to use MySQL (or MariaDB). Update accordingly if using a different database.
Installing PHP 7.3 on Centos 7
If yum-config-manager is not installed, install it as shown here:
yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php73
sudo yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql php-xml php-mbstring
Mac
brew install php