douyan1244 2019-06-25 23:06
浏览 110

CLI与内置服务器中包含奇怪的PHP .ini

My current config: - MacOS Mojave - PHP 7.3.5 installed via Homebrew - XDebug 2.7.2 installed via PECL - get_loaded_extensions() in both CLI and built-in server is enabled

While trying to configure XDebug on Mac I came across a strange problem. When calling

$ php --ini

I get

Configuration File (php.ini) Path: /usr/local/etc/php/7.3
Loaded Configuration File:         /usr/local/etc/php/7.3/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.3/conf.d
Additional .ini files parsed:      /usr/local/etc/php/7.3/conf.d/ext-opcache.ini,
/usr/local/etc/php/7.3/conf.d/ext-xdebug.ini

whereas calling

print php_ini_scanned_files();

in the script executed via built-in PHP server yields

/usr/local/etc/php/7.3/conf.d/ext-opcache.ini

Web server does not include my xdebug config, therefore there is no way to set xdebug.remote_enable=1 option properly.

What is even "better" is that editing /usr/local/etc/php/7.3/php.ini to cause parsing errors gives no warnings whatsoever.

I'm puzzled. Does anyone has any idea what's the reason behind this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名
    • ¥65 汇编语言除法溢出问题