@@ -11,20 +11,66 @@ rem Set build directory where PHP was compiled
1111set PHP_BUILD_DIR = C:\obj\Release_TS
1212
1313echo Build directory: %PHP_BUILD_DIR%
14- echo Contents:
15- dir %PHP_BUILD_DIR% \php*.exe
16- dir %PHP_BUILD_DIR% \php*.dll
14+ echo .
15+ echo Checking if php.exe exists:
16+ if exist %PHP_BUILD_DIR% \php.exe (
17+ echo FOUND: php.exe
18+ ) else (
19+ echo ERROR: php.exe not found!
20+ exit /b 1
21+ )
22+
23+ echo .
24+ echo Checking if php8ts.dll exists:
25+ if exist %PHP_BUILD_DIR% \php8ts.dll (
26+ echo FOUND: php8ts.dll
27+ ) else (
28+ echo ERROR: php8ts.dll not found!
29+ echo Looking for any PHP DLLs:
30+ dir %PHP_BUILD_DIR% \*.dll | findstr php
31+ echo Looking in obj directory:
32+ dir C:\obj\*.dll 2 > NUL | findstr php
33+ exit /b 1
34+ )
1735
1836echo .
19- echo Testing PHP executable...
37+ echo All files found, testing PHP executable...
2038cd /d %PHP_BUILD_DIR%
2139php.exe --version
2240set PHP_EXIT_CODE = %errorlevel%
2341
2442if %PHP_EXIT_CODE% neq 0 (
2543 echo ERROR: PHP failed to start (exit code: %PHP_EXIT_CODE% )
44+
45+ echo .
46+ echo === Detailed Diagnostics ===
47+
2648 echo Checking dependencies:
2749 dumpbin /dependents php.exe | findstr " \.dll"
50+
51+ echo .
52+ echo Checking which DLLs are actually present:
53+ for %%i in (php8ts.dll VCRUNTIME140.dll) do (
54+ if exist %%i (
55+ echo FOUND: %%i
56+ ) else (
57+ echo MISSING: %%i
58+ )
59+ )
60+
61+ echo .
62+ echo Using WHERE command to find missing DLLs:
63+ where php8ts.dll 2 > NUL || echo " php8ts.dll not in PATH"
64+ where VCRUNTIME140.dll 2 > NUL || echo " VCRUNTIME140.dll not in PATH"
65+
66+ echo .
67+ echo Checking Windows Event Log for application errors:
68+ powershell -Command " Get-WinEvent -FilterHashtable @{LogName='Application'; Level=2; StartTime=(Get-Date).AddMinutes(-1)} -MaxEvents 2 -ErrorAction SilentlyContinue | ForEach-Object { Write-Host ('Time: ' + $_.TimeCreated + ' - ID: ' + $_.Id + ' - Message: ' + $_.Message.Substring(0, [Math]::Min(200, $_.Message.Length))) }"
69+
70+ echo .
71+ echo Trying with SysInternals style dependency check:
72+ powershell -Command " try { [System.Reflection.Assembly]::LoadFile('%CD% \php.exe') } catch { Write-Host 'LoadFile error: ' $_.Exception.Message }"
73+
2874 exit /b 1
2975)
3076
0 commit comments