`zend_extension` php.ini uses different path discovery than `extension`
オープン
まだ誰も着手していません。
Bug
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、PHP 8.1.12 NTS ビルドに対して 2 つの Windows コマンドラインを再現し、extension と zend_extension の相対パスの扱いを比較します。拡張機能の読み込みエントリポイントとそのパス解決動作を追跡します。完了の条件は、絶対パスの動作を変更せずに、両方のディレクティブが同じ相対 DLL パスを見つけることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- backend, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100