`zend_extension` php.ini uses different path discovery than `extension`
未关闭
还没有人认领这个 Issue。
Bug
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Steps to reproduce:
File structure:
- ./ - current directory
- ./php-8.1.12-nts-Win32-vs16-x64 - extracted from official Windows download
- ./php-8.1.12-nts-Win32-vs16-x64\ext\php_xdebug.dll - downloaded from official xdebug website
When I run .\php-8.1.12-nts-Win32-vs16-x64\php.exe -d xdebug.mode=coverage -d extension=ext/php_xdebug test.php I get:
Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
... (xdebug is working, output from test.php code)
When I run .\php-8.1.12-nts-Win32-vs16-x64\php.exe -d xdebug.mode=coverage -d zend_extension=ext/php_xdebug.dll test.php I get:
Warning: Failed loading Zend extension 'ext/php_xdebug.dll' (tried: C:\php\ext\ext/php_xdebug.dll (The specified module could not be found), C:\php\ext\php_ext/php_xdebug.dll.dll (The specified module could not be found)) in Unknown on line 0
Fatal error: Uncaught Error: Call to undefined function xdebug_start_code_coverage() in C:\Users\mvorisek\Desktop\forks\cov-php81-debug\test.php:5
Stack trace:
#0 {main}
thrown in C:\Users\mvorisek\Desktop\forks\cov-php81-debug\test.php on line 5
I would expect exactly the same extension discovery for extension and zend_extension.
(and I can confirm zend_extension with absolute php_xdebug.dll path is working)
PHP Version
PHP 8.1.12 NTS Win x64
Operating System
Windows 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,针对 PHP 8.1.12 NTS 构建重现两条 Windows 命令行,并比较 extension 和 zend_extension 对相对路径的处理。跟踪扩展加载入口点及其路径解析行为;完成的标准是两个指令都能发现相同的相对 DLL 路径,同时不改变绝对路径的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- backend, operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100