mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.4'
This commit is contained in:
commit
5ba299be18
3 changed files with 17 additions and 12 deletions
3
.github/scripts/windows/test_task.bat
vendored
3
.github/scripts/windows/test_task.bat
vendored
|
@ -123,8 +123,9 @@ rem generate php.ini
|
|||
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
|
||||
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
|
||||
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
|
||||
rem work-around for some spawned PHP processes requiring OpenSSL
|
||||
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
|
||||
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
|
||||
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini
|
||||
|
||||
rem remove ext dlls for which tests are not supported
|
||||
for %%i in (ldap) do (
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
--TEST--
|
||||
Bug #79265 variation: "host:" not at start of header
|
||||
GH-16809 (fopen HTTP wrapper timeout stream context option overflow)
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$uri = "http://www.example.com";
|
||||
$serverCode = <<<'CODE'
|
||||
echo 1;
|
||||
CODE;
|
||||
|
||||
include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc";
|
||||
php_cli_server_start($serverCode, null, []);
|
||||
|
||||
$uri = "http://" . PHP_CLI_SERVER_ADDRESS . '/test';
|
||||
$config = [
|
||||
'http' => [
|
||||
'timeout' => PHP_INT_MIN,
|
||||
],
|
||||
'http' => [
|
||||
'timeout' => PHP_INT_MIN,
|
||||
],
|
||||
];
|
||||
$ctx = stream_context_create($config);
|
||||
var_dump(fopen($uri, "r", false, $ctx));
|
||||
|
@ -22,5 +29,5 @@ var_dump(fopen($uri, "r", false, $ctx));
|
|||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
|
||||
Warning: fopen(http://www.example.com): Failed to open stream: timeout must be lower than %d in %s on line %d
|
||||
Warning: fopen(http://%s): Failed to open stream: timeout must be lower than %d in %s on line %d
|
||||
bool(false)
|
||||
|
|
|
@ -5,9 +5,6 @@ sockets
|
|||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists("proc_open")) die("skip no proc_open");
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die('skip sockets ext currently does not work in worker on Windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -32,12 +29,12 @@ CODE;
|
|||
|
||||
$clientCode = <<<'CODE'
|
||||
$test = stream_socket_client("tcp://{{ ADDR }}", $errno, $errstr, 10);
|
||||
|
||||
echo phpt_wait();
|
||||
CODE;
|
||||
|
||||
include sprintf("%s/../../../openssl/tests/ServerClientTestCase.inc", __DIR__);
|
||||
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
server-delay:conn-nodelay
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue