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 算法题:数的划分,用记忆化DFS做WA求调
    • ¥15 chatglm-6b应用到django项目中,模型加载失败
    • ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
    • ¥15 CreateBitmapFromWicBitmap内存释放问题。
    • ¥30 win c++ socket
    • ¥30 CanMv K210开发板实现功能
    • ¥15 C# datagridview 栏位进度
    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web
    • ¥15 kali环境运行volatility分析android内存文件,缺profile