PHP: Difference between revisions
Jump to navigation
Jump to search
(→Mac) |
(→Mac) |
||
Line 41: | Line 41: | ||
</syntaxhighlight > | </syntaxhighlight > | ||
To install a specific version: | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
brew install php@7.4 | brew install php@7.4 |
Revision as of 06:11, 29 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
Latest:
brew install php
To install a specific version:
brew install php@7.4
The php.ini
and php-fpm.ini
files can be found in /opt/brew/etc/php/8.3/
.