PHP Ngnix Mysql in OSX with multiple PHP Versions

 https://kevdees.com/macos-11-big-sur-nginx-setup-multiple-php-versions/


https://github.com/shivammathur/homebrew-php


==


Upgrade PHP version from 8.2 to 8.3

1. Take the backup of PHP 8.2 ini file from /usr/local/etc/php/8.2/php.ini

/usr/local/etc/php/php.ini


2. Remove PHP 8.2

brew uninstall shivammathur/php/php@8.1

3. Install PHP 8.3

# Add the PHP and PHP Extension taps

brew tap shivammathur/php

brew tap shivammathur/extensions

# Install PHP 8.3

brew install shivammathur/php/php@8.3

# Link PHP 8.3 CLI executable as `php`

brew link --overwrite --force shivammathur/php/php@8.3

# Test installation

php -v

4. Restart

sudo killall php-fpm

sudo service php-fpm restart

5. Edit config file

vim /usr/local/etc/php/8.3/php-fpm.d/www.conf

# default

user = _www

group = _www

listen = 127.0.0.1:9000

# change to

user = <your_username>

group = staff

listen = 127.0.0.1:9074

brew services restart php@8.3

Other tools

Xdebug in shivammathur/homebrew-php

brew install shivammathur/extensions/xdebug@8.3

Add the following lines in /usr/local/etc/php/<your_php_version>/php.ini

;xdebug

[xdebug]

zend_extension="xdebug.so" 

xdebug.mode=debug 

xdebug.client_port=9003

xdebug.idekey=PHPSTORM

Comments

Popular posts from this blog

Programatically create layout builder section in Drupal

Code quality analysis of Drupal. Can I use Sonar?

Set up Drupal7 to Drupal8 migration in simple steps (using Drush)