MacOsx install php7.4 and force its use

MacBook Pro affichant du code

Start by installing homebrew /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” Next, use the following commands brew installs php@7.4 brew link –force php@7.4 brew services start php@7.4 export PATH”/usr/local/opt/php@7.4/bin:$PATH” export PATH”/usr/local/opt/php@7.4/sbin:$PATH” Once this is done, check that the PHP version is correct php -v PHP 7.4.13 (cli) (built: Nov 30 2020 14:46:04) ( NTS ) Copyright (c) … Read more

Nginx – phpmyadmin configuration as location next to a website

MacBook Pro affichant un éditeur de code

To start, install phpmyadmin at the desired location. compose create-project phpmyadmin/phpmyadmin I prefer to use composer, but there are other possibilities Once this is done, go in the folder /etc/nginx. To keep the configuration independent, it is possible to create a snippet. sudo nano snippets/phpmyadmin.conf Then the following configuration must be created. In this example … Read more

Xdebug installation with php 5.6 and Ubuntu

MacBook avec code sur un bureau

First of all you have to install the xdebug package for PHP 5.6 sudo apt-get install php-xdebug Then you have to enable it so it is accessible from PhpStorm for example Edit the file sudo nano /etc/php/5.6/mods-available/xdebug.ini and add the following lines xdebug.remote_enable xdebug.remote_connect_back xdebug.idekey – "vagrant" The PHP service needs to be restarted sudo … Read more

Docker: How to use XDebug with docker-compose

MacBook avec code sur un bureau

Docker In the docker-compose.yml file create an images/php image Import: build: images/php Ports: – 80:80 Volumes: – .. /..:/ var/www find your IP address (ifconfig / ipconfig) – in my example (10.1.0.133) Create a Dockerfile in the images/php folder FROM php:7.0.1-apache RUN yes pecl install -o -f xdebug rm -rf /tmp/pear "zend_extension/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so" – /usr/local/etc/php/conf.d/xdebug.ini echo … Read more

Docker: How to use nano

MacBook Pro affichant un éditeur de code

To use nano in Docker, you have to update apt-get and install nano. When trying to open a file you may face the error Error opening terminal: unknown. No worries, just export the TERM=xterm variable apt-get update apt-get install nano export TERM-xterm