重启php
brew services restart php
php 查看相关信息
使用 php -i 查看php在cli下面的详细信息
使用 php -m查看php 在cli下面加载了哪些模块
Mac系统下Xdebug模块在phpinfo()不显示
apachectl configtest
用来检测httpd.conf文件是否书写正确。
/private/etc/apache2/httpd.conf
/usr/libexec/apache2/libphp.so
php 8.0.10
php -m
php -i
php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Xdebug
Zend OPcache
intellij idea php xdebug3 支持调试等
# php --ini
# vim /usr/local/etc/php/8.0/php.ini
extension="redis.so"
zend_extension="xdebug.so"
[xdebug]
xdebug.mode = debug
xdebug.start_with_request=yes
xdebug.client_host ="127.0.0.1"
xdebug.client_port =9010
# xdebug.client_host/xdebug.client_port
xdebug.collect_return=On
xdebug.idekey="XDEBUG_demo"
xdebug.log="/Users/xxx/phplog/xdebug.log"
apache 配置php
不能加载xdebug。
➜ server git:(master) ✗ apachectl configtest
[Mon Sep 06 13:59:04.677136 2021] [so:warn] [pid 85070] AH06665: No code signing authority for module at /usr/local/Cellar/php/8.0.10/lib/httpd/modules/libphp.so specified in LoadModule directive. Proceeding with loading process, but this will be an error condition in a future version of macOS.
httpd: Syntax error on line 187 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php/8.0.10/lib/httpd/modules/libphp.so into server: dlopen(/usr/local/Cellar/php/8.0.10/lib/httpd/modules/libphp.so, 10): Symbol not found: _sqlite3_enable_load_extension\n Referenced from: /usr/local/Cellar/php/8.0.10/lib/httpd/modules/libphp.so\n Expected in: /usr/lib/libsqlite3.dylib\n in /usr/local/Cellar/php/8.0.10/lib/httpd/modules/libphp.so
网友评论