checkdnsrr/dns_check_record works in CLI but not in mod_php on macOS
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.1k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
The following code:
<?php
$result = checkdnsrr('google.com', 'A');
var_dump($result);
Resulted in this output:
bool(false)
But I expected this output instead:
bool(true)
3v4l link: https://3v4l.org/mchKq
3v4l also seems unable to get "true" out of this. However, this works fine on my machine:
/opt/homebrew/bin/php -r '$result = checkdnsrr("google.com", "A"); var_dump($result);'
My Rocky 6 production server (yes we're upgrading) also gets true for this code, even in mod_php.
I initially spotted this behavior in 7.4, but verified it's present on 8.4 as well.
PHP Version
PHP 8.4.7 (cli) (built: May 6 2025 12:31:58) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
Zend Engine v4.4.7, Copyright (c) Zend Technologies
with Zend OPcache v8.4.7, Copyright (c), by Zend Technologies
Here's the top of the mod_php phpinfo() output:
PHP Version 8.4.7
| System | Darwin Vanessas-MacBook-Pro.local 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6030 arm64 |
|---|---|
| Build Date | May 6 2025 12:31:58 |
| Build System | Darwin Sequoia-arm64.local 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:24 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_VMAPPLE arm64 |
| Build Provider | Homebrew |
Operating System
macOS Sequoia 15.4.1 on ARM (Apple M3 Pro)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されたコマンドと例を使用して、macOS 上の CLI と mod_php の両方で PHP 8.4.7 による checkdnsrr('google.com', 'A') の結果を再現します。2 つの実行環境を比較して DNS ルックアップの動作が異なる理由を特定します。同じルックアップが mod_php で期待される true の結果を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos, php
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100