MaJ du 04-02-2021

This commit is contained in:
2021-02-04 09:55:26 +01:00
parent 84b4e1a85d
commit fb07a20b0c
56 changed files with 4962 additions and 95 deletions

View File

@@ -113,6 +113,9 @@ Chaque version de PHP a son propre répertoire d'extensions:
/usr/local/lib/php/pecl/20170718 ← 7.2
/usr/local/lib/php/pecl/20180731 ← 7.3
/usr/local/lib/php/pecl/20190902 ← 7.4
/usr/local/lib/php/pecl/20200930 ← 8.0
/usr/local/Cellar/php@7.4/7.4.14_1/pecl/20190902/
```
@@ -140,7 +143,7 @@ extension="ssh2.so"
```
```bash
# Installation de xdebug:
# Installation de Xdebug:
$ wget http://xdebug.org/files/xdebug-x.x.x.tgz
$ tar -xzvf xdebug-x.x.x.tgz
@@ -151,6 +154,37 @@ $ make
$ make install
```
```bash
# Installation de imagick:
git clone https://github.com/Imagick/imagick
cd imagick
phpize && ./configure
make
make install
```
[Activer / désactiver](https://gist.githubusercontent.com/rhukster/073a2c1270ccb2c6868e7aced92001cf/raw/c1629293bcf628cd6ded20c201c4ef0a2fa79144/xdebug) Xdebug:
```bash
curl -L https://gist.githubusercontent.com/rhukster/073a2c1270ccb2c6868e7aced92001cf/raw/c1629293bcf628cd6ded20c201c4ef0a2fa79144/xdebug > /usr/local/bin/xdebug
chmod +x /usr/local/bin/xdebug
# Utilisation:
xdebug on
xdebug off
```
```bash
https://pecl.php.net
https://github.com/Imagick/imagick.git
https://github.com/php/pecl-file_formats-yaml.git
```
### Erreurs:

View File

@@ -0,0 +1,87 @@
# PHP 7.4
#### Installer PHP 7.4
```bash
$ brew install php@7.4
```
### Changer de version de PHP:
#### Installer Brew PHP Switcher
```bash
$ brew install brew-php-switcher
```
Changer de version:
```bash
$ brew-php-switcher 7.3
```
Version de PHP (Apache):
```bash
php --info | grep 'PHP Version' | sed -n '1p'
PHP Version => 7.4.9
```
Version de PHP (cli):
```bash
php -v
PHP 7.4.9 (cli) (built: Aug 7 2020 19:23:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies
with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans
```
Version de l'API:
```bash
php --info | grep 'PHP API'
PHP API => 20190902
```
PECL et PEAR sont linkés:
```bash
which pecl
/usr/local/bin/pecl
which pear
/usr/local/bin/pear
```
#### Installer des extensions (avec [PECL](https://pecl.php.net)):
Requiert autoconf: `brew install autoconf`
```bash
$ pecl uninstall -r xdebug
$ pecl install xdebug
$ pecl install yaml
$ pecl install apcu
$ pecl install imagick
$ pecl install ssh2
$ pecl install memcached
$ pecl install redis
# Pour une version spécifique:
$ pecl install xdebug-2.7.0beta1
```

View File

@@ -0,0 +1,63 @@
# PHP 8
https://getgrav.org/blog/macos-bigsur-apache-mysql-vhost-apc
https://stitcher.io/blog/the-latest-php-version
#### Installer des extensions (avec [PECL](https://pecl.php.net)):
Requiert autoconf: `brew install autoconf`
```bash
$ pecl uninstall -r xdebug
$ pecl install xdebug
$ pecl install yaml
$ pecl install apcu
$ pecl install redis
$ pecl install memcached
$ pecl install imagick # Ne fontionne pas (pecl ou compile)
$ pecl install ssh2 # Ne fontionne pas (pecl ou compile)
# Pour une version spécifique:
$ pecl install xdebug-2.7.0beta1
```
Pour les activer, créez un fichier de configuration dans `/usr/local/etc/php/8.0/conf.d/`
```bash
/usr/local/etc/php/8.0/conf.d 20s
ls -la
total 16
-rw-r--r-- 1 bruno admin 27 Dec 1 09:39 ext-apcu.ini
-rw-r--r-- 1 bruno admin 74 Dec 1 09:26 ext-opcache.ini
-rw-r--r-- 1 bruno admin 27 Dec 1 09:39 ext-ssh2.ini.bak
-rw-r--r-- 1 bruno admin 392 Dec 1 09:39 ext-xdebug.ini
/usr/local/etc/php/8.0/conf.d
code ext-xdebug.ini
[xdebug]
zend_extension="xdebug.so"
xdebug.client_host = 127.0.0.1
;xdebug.client_port = 9001
xdebug.mode = debug
;xdebug.discover_client_host = true
;xdebug.start_with_request = yes
;xdebug.start_upon_error = yes
;xdebug.log_level = 10
xdebug.log = "/tmp/xdebug.log"
xdebug.output_dir = "/tmp/xdebug"
xdebug.profiler_output_name="cachegrind.out.%t.%p"
xdebug.trace_output_name= %H-%p.trace
```