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

我当前的配置:

  • MacOS Mojave
  • PHP 7.3.5通过Homebrew安装
  • XDebug 2.7 .2在CLI和内置服务器中通过PECL
  • get_loaded_extensions()安装启用</ p>

    尝试在Mac上配置XDebug时遇到了一个奇怪的问题。
    当调用<时 / p>

      $ php --ini 
     code>  pre> 
    
    

    我得到 p>

     配置文件(php.ini)路径:/usr/local/etc/php/7.3
    Loaded配置文件:/usr/local/etc/php/7.3/php.ini
    Scan用于:/ usr中的其他.ini文件 /local/etc/php/7.3/conf.d
    解析了其他.ini文件:/usr/local/etc/php/7.3/conf.d/ext-opcache.ini,
    /usr/local/etc/php  /7.3/conf.d/ext-xdebug.ini
    

    nn

    whereas calling </ p>

      print php_ini_scanned_files(); 通过内置PHP服务器执行的脚本中的
     code>  pre> 
    
    

    p>

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

    nn

    网络服务器不包含我的 xdebug </ code> config,因此无法正确设置 xdebug.remote_enable = 1 </ code>选项。</ p>

    什么是“更好”的是 编辑 /usr/local/etc/php/7.3/php.ini </ code>导致解析错误没有任何警告。</ p>

    我很困惑。 有谁知道这背后的原因是什么?</ p>
    </ div>

展开原文

原文

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?

dsrw29618
dsrw29618 我对此一无所知,但你见过stackoverflow.com/q/27861720/735926吗?
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐