php / php/php-src

mb_http_input test is faild on Windows

オープン
#14,407 コメント 9 件 リアクション 0 件 担当者 1 名 GitHub で見る

@alexdowad がすでに取り組んでいます。

2024年6月1日 から。

Bug Extension: mbstring Status: Needs Triage
主要言語
C
スター
40.4k
フォーク
8.1k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

The following code:

C:\php-sdk\php-src
+$ nmake test TESTS=ext/mbstring
... ommited ...

Resulted in this output:

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
mb_http_input() [C:\php-sdk\php-src\ext\mbstring\tests\mb_http_input.phpt]
mb_http_input() with pass encoding [C:\php-sdk\php-src\ext\mbstring\tests\mb_http_input_pass.phpt]
=====================================================================
NMAKE : fatal error U1077: 'C:\php-sdk\php-src\x64\Debug_TS\php.exe' : リターン コード '0x1'
Stop.

But I expected this output instead:
Test all passed in mbstring.

I got an error when I put --enable-cgi. At least, PHP 8.0 and master is failed.

config.nice.bat script

@echo off
cscript /nologo /e:jscript configure.js "--disable-all" "--enable-cli" "--enable-cgi" "--enable-debug" "--enable-mbstring" "--enable-intl" %*

mb_http_input.log


---- EXPECTED OUTPUT
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
bool(false)
bool(false)
array(1) {
  [0]=>
  string(10) "ISO-8859-1"
}
string(10) "ISO-8859-1"
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
---- ACTUAL OUTPUT
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
ƁEܸE123456789ƁEܸE«¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
bool(false)
bool(false)
array(1) {
  [0]=>
  string(10) "ISO-8859-1"
}
string(10) "ISO-8859-1"
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
---- FAILED

mb_http_input.diff

     ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
002+ ƁEܸE123456789ƁEܸE«¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
002- ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
     string(10) "ISO-8859-1"
     string(10) "ISO-8859-1"
     bool(false)
--

mb_http_input_pass.log


---- EXPECTED OUTPUT
���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
string(4) "pass"
string(4) "pass"
bool(false)
bool(false)
array(1) {
  [0]=>
  string(4) "pass"
}
string(4) "pass"
---- ACTUAL OUTPUT
���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
ƁEܸ�E123456789ƁEܸ�E������ʤҤ餬��
string(4) "pass"
string(4) "pass"
bool(false)
bool(false)
array(1) {
  [0]=>
  string(4) "pass"
}
string(4) "pass"
---- FAILED

mb_http_input_pass.diff

     ���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
002+ ƁEܸ�E123456789ƁEܸ�E������ʤҤ餬��
002- ���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
     string(4) "pass"
     string(4) "pass"
     bool(false)
--

My environment is:

  • Windows 11
  • Probably character code is cp932

Please see below .log file and .diff files.
mb_http_input_test_failes.zip

PHP Version

PHP 8.0 - master

Operating System

Windows

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。