64 lines
1.4 KiB
Markdown
64 lines
1.4 KiB
Markdown
# 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
|
||
|
||
```
|
||
|