From c96051686cc9f857b5f9a316fa813fe44459a4cb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 12:03:28 +0100 Subject: [PATCH 01/20] Try building on windows-2025 The latest Windows release (24H2) apparently updated the JScript which can cause issues (see #17759). Check if there are more. --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b92a55b58b87d..23fbf76a5e5b3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -236,7 +236,7 @@ jobs: WINDOWS: if: github.repository == 'php/php-src' || github.event_name == 'pull_request' name: WINDOWS_X64_ZTS - runs-on: windows-2022 + runs-on: windows-2025 timeout-minutes: 50 env: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache From d9463a8b5cb6c83bae25e40d975a9fcd69d6e7ee Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 12:18:26 +0100 Subject: [PATCH 02/20] disable non Windows jobs --- .github/workflows/push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 23fbf76a5e5b3..c5c59ee24b1c2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,7 +41,7 @@ env: CXX: ccache g++ jobs: LINUX_X64: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false services: mysql: image: mysql:8.3 @@ -137,7 +137,7 @@ jobs: if: ${{ !matrix.asan }} uses: ./.github/actions/verify-generated-files LINUX_X32: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false name: LINUX_X32_DEBUG_ZTS runs-on: ubuntu-latest timeout-minutes: 50 @@ -193,7 +193,7 @@ jobs: -d zend_extension=opcache.so -d opcache.enable_cli=1 MACOS_DEBUG_NTS: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false strategy: fail-fast: false matrix: @@ -262,7 +262,7 @@ jobs: run: .github/scripts/windows/test.bat BENCHMARKING: name: BENCHMARKING - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' + if: false runs-on: ubuntu-24.04 timeout-minutes: 50 steps: From 78a18bc7f84170cc4bd4c430078d96150b370f28 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 12:19:01 +0100 Subject: [PATCH 03/20] windows-2025 has PostGreSQL 17 --- .github/actions/setup-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml index e0a3fd4e7d316..6c91759fee311 100644 --- a/.github/actions/setup-windows/action.yml +++ b/.github/actions/setup-windows/action.yml @@ -16,5 +16,5 @@ runs: - name: Setup PostgreSQL shell: pwsh run: | - Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running + Set-Service -Name "postgresql-x64-17" -StartupType manual -Status Running pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" } From a0e45b04eeca28e0c0e761e549aaff8a271bcf1c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 12:38:28 +0100 Subject: [PATCH 04/20] Use HEAD of php-sdk to work around missing wmic This could should be revised; the whole caching was AppVeyor specific, and doesn't work as expected with GH runners. At least, this is unnecessarily complex. --- .github/scripts/windows/build.bat | 18 +++++++++--------- .github/workflows/push.yml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/scripts/windows/build.bat b/.github/scripts/windows/build.bat index 65f40fb9462a7..a2157500028e7 100644 --- a/.github/scripts/windows/build.bat +++ b/.github/scripts/windows/build.bat @@ -26,15 +26,15 @@ if not exist "%PHP_BUILD_CACHE_SDK_DIR%" ( git clone --branch %SDK_BRANCH% %SDK_REMOTE% --depth 1 "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1 ) -for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a -echo Got SDK version %GOT_SDK_VER% -if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" ( - echo Switching to the configured SDK version %SDK_BRANCH:~8% - echo Fetching remote SDK repository - git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1 - echo Checkout SDK repository branch - git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH% -) +@REM for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a +@REM echo Got SDK version %GOT_SDK_VER% +@REM if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" ( +@REM echo Switching to the configured SDK version %SDK_BRANCH:~8% +@REM echo Fetching remote SDK repository +@REM git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1 +@REM echo Checkout SDK repository branch +@REM git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH% +@REM ) if not exist "%SDK_RUNNER%" ( echo "%SDK_RUNNER%" doesn't exist diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c5c59ee24b1c2..295b2ef9dab4f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -242,7 +242,7 @@ jobs: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache PHP_BUILD_OBJ_DIR: C:\obj PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk - PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0 + PHP_BUILD_SDK_BRANCH: 7f8df69fa5add8beac56916ed69de24e34974f6e PHP_BUILD_CRT: vs17 PLATFORM: x64 THREAD_SAFE: "1" From 00b2d37e4998c89d42ed47965dddc5a2830920ca Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 12:49:54 +0100 Subject: [PATCH 05/20] fix --- .github/scripts/windows/build.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/windows/build.bat b/.github/scripts/windows/build.bat index a2157500028e7..b9e43814a1104 100644 --- a/.github/scripts/windows/build.bat +++ b/.github/scripts/windows/build.bat @@ -23,7 +23,10 @@ if not exist "%SDK_RUNNER%" ( if not exist "%PHP_BUILD_CACHE_SDK_DIR%" ( echo Cloning remote SDK repository - git clone --branch %SDK_BRANCH% %SDK_REMOTE% --depth 1 "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1 + git clone %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1 + pushd "%PHP_BUILD_CACHE_SDK_DIR%" + git reset --hard %SDK_BRANCH% + popd ) @REM for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a From a251548d7f7af867f64ca07e641f3c11da7cfbdc Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 13:51:28 +0100 Subject: [PATCH 06/20] debug It seems where grabbing the system OpenSLL DLLs instead of our own. --- .github/scripts/windows/build_task.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index b1b994e2034d7..4789f669febfc 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -47,4 +47,7 @@ if %errorlevel% neq 0 exit /b 3 nmake /NOLOGO if %errorlevel% neq 0 exit /b 3 +nmake run ARGS="-r ""var_dump(getenv('PATH'));""" +nmake run ARGS="-r ""var_dump(exec('where libcrypto-3-x64.dll'));""" + exit /b 0 From 56914c26b4e88366a459c8442f13517476d110bf Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 14:17:31 +0100 Subject: [PATCH 07/20] moar --- .github/scripts/windows/build_task.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 4789f669febfc..bd8abfd627396 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -25,6 +25,8 @@ if not exist "%DEPS_DIR%" ( ) if %errorlevel% neq 0 exit /b 3 +dir %DEPS_DIR%\bin + cmd /c buildconf.bat --force if %errorlevel% neq 0 exit /b 3 @@ -48,6 +50,6 @@ nmake /NOLOGO if %errorlevel% neq 0 exit /b 3 nmake run ARGS="-r ""var_dump(getenv('PATH'));""" -nmake run ARGS="-r ""var_dump(exec('where libcrypto-3-x64.dll'));""" +nmake run ARGS="-r ""var_dump(shell_exec('where libcrypto-3-x64.dll'));""" exit /b 0 From e1d0ef279acb978f0b11a3b269cff981e500bb40 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 14:42:51 +0100 Subject: [PATCH 08/20] Sledge hammer To work around issues with DLLs we're using, but which are also in the system folder, we do `nmake snap` which (amongst other things) places our DLLs in the app folder, so these should be grabbed up first. This might take a bit long for CI, but let's see. --- .github/scripts/windows/build_task.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index bd8abfd627396..3992cec1ebcc5 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -52,4 +52,6 @@ if %errorlevel% neq 0 exit /b 3 nmake run ARGS="-r ""var_dump(getenv('PATH'));""" nmake run ARGS="-r ""var_dump(shell_exec('where libcrypto-3-x64.dll'));""" +nmake snap + exit /b 0 From 31ff123e669433dd8549fbc81afe53c3c7ec775e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 15:40:46 +0100 Subject: [PATCH 09/20] Debug --- .github/scripts/windows/test_task.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index f095260419ebc..9cda2ead41514 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -140,6 +140,10 @@ set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe if "%ASAN%" equ "1" set ASAN_OPTS=--asan +curl -sL https://download.sysinternals.com/files/ListDlls.zip +7z x -oC:\ListDlls ListDlls.zip +C:\ListDlls\Listdlls64.exe -v libcrypto-3-x64.dll + mkdir c:\tests_tmp nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK %ASAN_OPTS% --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" From e94a67b78a75584204f7ba71becc428aae19abb2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 15:59:19 +0100 Subject: [PATCH 10/20] fix --- .github/scripts/windows/test_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 9cda2ead41514..7b75e14992ee1 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -140,7 +140,7 @@ set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe if "%ASAN%" equ "1" set ASAN_OPTS=--asan -curl -sL https://download.sysinternals.com/files/ListDlls.zip +curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip C:\ListDlls\Listdlls64.exe -v libcrypto-3-x64.dll From 84c55381c32d40a134cc4106f1b2dd4833b232a7 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 16:25:33 +0100 Subject: [PATCH 11/20] fox --- .github/scripts/windows/test_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 7b75e14992ee1..b6e66457b2d42 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -142,7 +142,7 @@ if "%ASAN%" equ "1" set ASAN_OPTS=--asan curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip -C:\ListDlls\Listdlls64.exe -v libcrypto-3-x64.dll +C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll mkdir c:\tests_tmp From 50f0fd101bfa6b6f921e263e07d704d1cfbef051 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 16:49:08 +0100 Subject: [PATCH 12/20] moar --- .github/scripts/windows/test_task.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index b6e66457b2d42..594dfb465bc65 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -143,6 +143,7 @@ if "%ASAN%" equ "1" set ASAN_OPTS=--asan curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll +nmake run ARGS="-r ""var_dump(shell_exec('C:\\ListDlls\\Listdlls64.exe -accepteula -v php.exe'));""" mkdir c:\tests_tmp From 36c2d7752569e87c4351aef9002be064b7685d75 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 17:11:32 +0100 Subject: [PATCH 13/20] is ldd available? --- .github/scripts/windows/test_task.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 594dfb465bc65..3795e3c12da99 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -144,6 +144,7 @@ curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll nmake run ARGS="-r ""var_dump(shell_exec('C:\\ListDlls\\Listdlls64.exe -accepteula -v php.exe'));""" +ldd %PHP_BUILD_DIR%\php.exe mkdir c:\tests_tmp From 067911f6a9e61670cd207f3e89cb93636bcc6908 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 17:39:51 +0100 Subject: [PATCH 14/20] check known dlls --- .github/scripts/windows/test_task.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 3795e3c12da99..5b148be78e77e 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -144,7 +144,8 @@ curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll nmake run ARGS="-r ""var_dump(shell_exec('C:\\ListDlls\\Listdlls64.exe -accepteula -v php.exe'));""" -ldd %PHP_BUILD_DIR%\php.exe +ldd %PHP_BUILD_DIR%\ext\php_openssl.dll +reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs" /v /f * mkdir c:\tests_tmp From e004e6b5ee2a1e7a433d73c8a06abc96f7f5db60 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 18:24:36 +0100 Subject: [PATCH 15/20] delete system DLLs --- .github/scripts/windows/build_task.bat | 4 ++-- .github/scripts/windows/test_task.bat | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 3992cec1ebcc5..5d3047c8e2c89 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -5,9 +5,9 @@ if /i "%GITHUB_ACTIONS%" neq "True" ( exit /b 3 ) -del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL +del /f /q C:\Windows\System32\libcrypto-3-x64.dll >NUL 2>NUL if %errorlevel% neq 0 exit /b 3 -del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL +del /f /q C:\Windows\System32\libssl-3-x64.dll >NUL 2>NUL if %errorlevel% neq 0 exit /b 3 call %~dp0find-target-branch.bat diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 5b148be78e77e..049c5794bf6a6 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -144,8 +144,9 @@ curl -sLO https://download.sysinternals.com/files/ListDlls.zip 7z x -oC:\ListDlls ListDlls.zip C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll nmake run ARGS="-r ""var_dump(shell_exec('C:\\ListDlls\\Listdlls64.exe -accepteula -v php.exe'));""" -ldd %PHP_BUILD_DIR%\ext\php_openssl.dll +ldd %PHP_BUILD_DIR%\php_openssl.dll reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs" /v /f * +dir %PHP_BUILD_DIR%\libcrypto-3-x64.dll mkdir c:\tests_tmp From a9751006afb5f78f4485545252cf10b817ce6d74 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 19:08:43 +0100 Subject: [PATCH 16/20] Revert "Sledge hammer" This reverts commit e1d0ef279acb978f0b11a3b269cff981e500bb40. This doesn't work, unless we would target the subfolder with the snapshot build. It's also pretty slow. --- .github/scripts/windows/build_task.bat | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 5d3047c8e2c89..111c16cf17af4 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -52,6 +52,4 @@ if %errorlevel% neq 0 exit /b 3 nmake run ARGS="-r ""var_dump(getenv('PATH'));""" nmake run ARGS="-r ""var_dump(shell_exec('where libcrypto-3-x64.dll'));""" -nmake snap - exit /b 0 From a11f7b125f95dfe6b358931b2bbc562cf8ee704a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 19:10:19 +0100 Subject: [PATCH 17/20] copy auxilliary DLLs to build dir --- .github/scripts/windows/test_task.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 049c5794bf6a6..10dabf7983971 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -148,6 +148,8 @@ ldd %PHP_BUILD_DIR%\php_openssl.dll reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs" /v /f * dir %PHP_BUILD_DIR%\libcrypto-3-x64.dll +copy /-y %DEPS_DIR%\bin\*.dll %PHP_BUILD_DIR%\* + mkdir c:\tests_tmp nmake test TESTS="%OPCACHE_OPTS% -g FAIL,BORK,LEAK,XLEAK %ASAN_OPTS% --no-progress -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" From a3e10e464c0314774132d56b297df66cf18cfb8b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 19:11:19 +0100 Subject: [PATCH 18/20] don't delete "system" DLLs That's even worse than putting non-system DLLs into the system folder. --- .github/scripts/windows/build_task.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 111c16cf17af4..766fba8ef6309 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -5,10 +5,10 @@ if /i "%GITHUB_ACTIONS%" neq "True" ( exit /b 3 ) -del /f /q C:\Windows\System32\libcrypto-3-x64.dll >NUL 2>NUL -if %errorlevel% neq 0 exit /b 3 -del /f /q C:\Windows\System32\libssl-3-x64.dll >NUL 2>NUL -if %errorlevel% neq 0 exit /b 3 +@REM del /f /q C:\Windows\System32\libcrypto-3-x64.dll >NUL 2>NUL +@REM if %errorlevel% neq 0 exit /b 3 +@REM del /f /q C:\Windows\System32\libssl-3-x64.dll >NUL 2>NUL +@REM if %errorlevel% neq 0 exit /b 3 call %~dp0find-target-branch.bat set STABILITY=staging From 4d00ff8bd400ddf0d2f68c9e6263689a09d2a947 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 20:07:26 +0100 Subject: [PATCH 19/20] Adapt tests to Windows 11 Apparently, one of the more recent patch releases of Windows 10 (confirmed for Windows 10.0.26100, but may affect older versions, too) changed treatment of filenames with trailing slashes to be recognized explicitly as directories, and no longer as invalid file or directory. We adapt the affected test cases. --- ext/standard/tests/file/rename_variation-win32.phpt | 2 +- ext/standard/tests/file/unlink_variation8-win32.phpt | 4 ++-- ext/standard/tests/file/unlink_variation9-win32.phpt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/standard/tests/file/rename_variation-win32.phpt b/ext/standard/tests/file/rename_variation-win32.phpt index dc7586d5042b7..a348438bed556 100644 --- a/ext/standard/tests/file/rename_variation-win32.phpt +++ b/ext/standard/tests/file/rename_variation-win32.phpt @@ -61,7 +61,7 @@ bool(false) bool(true) -- Iteration 2 -- -Warning: rename(%s/rename_variation-win32/rename_variation.tmp/,%s/rename_variation2.tmp): The filename, directory name, or volume label syntax is incorrect (code: 123) in %s on line %d +Warning: rename(%s/rename_variation-win32/rename_variation.tmp/,%s/rename_variation2.tmp): %rThe filename, directory name, or volume label syntax is incorrect|The directory name is invalid%r (code: %r123|267%r) in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/unlink_variation8-win32.phpt b/ext/standard/tests/file/unlink_variation8-win32.phpt index 12ace11fc196c..016beddce1c13 100644 --- a/ext/standard/tests/file/unlink_variation8-win32.phpt +++ b/ext/standard/tests/file/unlink_variation8-win32.phpt @@ -95,10 +95,10 @@ file removed Warning: unlink(%s/BADDIR/file.tmp): No such file or directory in %s on line %d -- removing unlinkVar8.tmp/file.tmp/ -- -Warning: unlink(unlinkVar8.tmp/file.tmp/): No such file or directory in %s on line %d +Warning: unlink(unlinkVar8.tmp/file.tmp/): %rNo such file or directory|Not a directory%r in %s on line %d -- removing %s/unlinkVar8.tmp/file.tmp/ -- -Warning: unlink(%s/unlinkVar8.tmp/file.tmp/): No such file or directory in %s on line %d +Warning: unlink(%s/unlinkVar8.tmp/file.tmp/): %rNo such file or directory|Not a directory%r in %s on line %d -- removing unlinkVar8.tmp//file.tmp -- file removed -- removing %s//unlinkVar8.tmp//file.tmp -- diff --git a/ext/standard/tests/file/unlink_variation9-win32.phpt b/ext/standard/tests/file/unlink_variation9-win32.phpt index a69c27088e94a..68e11be927637 100644 --- a/ext/standard/tests/file/unlink_variation9-win32.phpt +++ b/ext/standard/tests/file/unlink_variation9-win32.phpt @@ -97,10 +97,10 @@ file removed Warning: unlink(%s\BADDIR\file.tmp): No such file or directory in %s on line %d -- removing unlinkVar9.tmp\file.tmp\ -- -Warning: unlink(unlinkVar9.tmp\file.tmp\): No such file or directory in %s on line %d +Warning: unlink(unlinkVar9.tmp\file.tmp\): %rNo such file or directory|Not a directory%r in %s on line %d -- removing %s\unlinkVar9.tmp\file.tmp\ -- -Warning: unlink(%s\unlinkVar9.tmp\file.tmp\): No such file or directory in %s on line %d +Warning: unlink(%s\unlinkVar9.tmp\file.tmp\): %rNo such file or directory|Not a directory%r in %s on line %d -- removing unlinkVar9.tmp\\file.tmp -- file removed -- removing %s\\unlinkVar9.tmp\\file.tmp -- From 52524fe3e2032172ef69a4b5ae35623c27f1793e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 11 Feb 2025 20:14:44 +0100 Subject: [PATCH 20/20] clean up --- .github/scripts/windows/build_task.bat | 13 ++++--------- .github/scripts/windows/test_task.bat | 8 -------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 766fba8ef6309..b1b994e2034d7 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -5,10 +5,10 @@ if /i "%GITHUB_ACTIONS%" neq "True" ( exit /b 3 ) -@REM del /f /q C:\Windows\System32\libcrypto-3-x64.dll >NUL 2>NUL -@REM if %errorlevel% neq 0 exit /b 3 -@REM del /f /q C:\Windows\System32\libssl-3-x64.dll >NUL 2>NUL -@REM if %errorlevel% neq 0 exit /b 3 +del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 +del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL +if %errorlevel% neq 0 exit /b 3 call %~dp0find-target-branch.bat set STABILITY=staging @@ -25,8 +25,6 @@ if not exist "%DEPS_DIR%" ( ) if %errorlevel% neq 0 exit /b 3 -dir %DEPS_DIR%\bin - cmd /c buildconf.bat --force if %errorlevel% neq 0 exit /b 3 @@ -49,7 +47,4 @@ if %errorlevel% neq 0 exit /b 3 nmake /NOLOGO if %errorlevel% neq 0 exit /b 3 -nmake run ARGS="-r ""var_dump(getenv('PATH'));""" -nmake run ARGS="-r ""var_dump(shell_exec('where libcrypto-3-x64.dll'));""" - exit /b 0 diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 10dabf7983971..2f4871561b06a 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -140,14 +140,6 @@ set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe if "%ASAN%" equ "1" set ASAN_OPTS=--asan -curl -sLO https://download.sysinternals.com/files/ListDlls.zip -7z x -oC:\ListDlls ListDlls.zip -C:\ListDlls\Listdlls64.exe -accepteula -v libcrypto-3-x64.dll -nmake run ARGS="-r ""var_dump(shell_exec('C:\\ListDlls\\Listdlls64.exe -accepteula -v php.exe'));""" -ldd %PHP_BUILD_DIR%\php_openssl.dll -reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs" /v /f * -dir %PHP_BUILD_DIR%\libcrypto-3-x64.dll - copy /-y %DEPS_DIR%\bin\*.dll %PHP_BUILD_DIR%\* mkdir c:\tests_tmp