@@ -2386,6 +2386,31 @@ exec ./configure "$@"
2386
2386
2387
2387
log ( `✅ PHP ${ config . phpVersion } built successfully at ${ installPrefix } ` )
2388
2388
2389
+ // Verify that the binary was actually installed
2390
+ const phpBinaryPath = join ( installPrefix , 'bin' , 'php' )
2391
+ if ( existsSync ( phpBinaryPath ) ) {
2392
+ log ( `✅ PHP binary verified at: ${ phpBinaryPath } ` )
2393
+ } else {
2394
+ log ( `❌ PHP binary not found at expected location: ${ phpBinaryPath } ` )
2395
+ log ( `🔍 Contents of ${ installPrefix } :` )
2396
+ if ( existsSync ( installPrefix ) ) {
2397
+ const contents = readdirSync ( installPrefix )
2398
+ log ( ` ${ contents . join ( ', ' ) } ` )
2399
+
2400
+ // Check if bin directory exists
2401
+ const binDir = join ( installPrefix , 'bin' )
2402
+ if ( existsSync ( binDir ) ) {
2403
+ log ( `🔍 Contents of ${ binDir } :` )
2404
+ const binContents = readdirSync ( binDir )
2405
+ log ( ` ${ binContents . join ( ', ' ) } ` )
2406
+ } else {
2407
+ log ( `❌ bin directory does not exist at ${ binDir } ` )
2408
+ }
2409
+ } else {
2410
+ log ( `❌ Install prefix directory does not exist: ${ installPrefix } ` )
2411
+ }
2412
+ }
2413
+
2389
2414
// Test the binary (platform-specific)
2390
2415
if ( config . platform === 'win32' ) {
2391
2416
const phpBinary = join ( installPrefix , 'bin' , 'php.exe' )
@@ -2714,6 +2739,32 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
2714
2739
createUnixPhpIni ( installPrefix , config )
2715
2740
2716
2741
log ( `✅ PHP ${ config . phpVersion } built successfully with system libraries` )
2742
+
2743
+ // Verify that the binary was actually installed
2744
+ const phpBinaryPath = join ( installPrefix , 'bin' , 'php' )
2745
+ if ( existsSync ( phpBinaryPath ) ) {
2746
+ log ( `✅ PHP binary verified at: ${ phpBinaryPath } ` )
2747
+ } else {
2748
+ log ( `❌ PHP binary not found at expected location: ${ phpBinaryPath } ` )
2749
+ log ( `🔍 Contents of ${ installPrefix } :` )
2750
+ if ( existsSync ( installPrefix ) ) {
2751
+ const contents = readdirSync ( installPrefix )
2752
+ log ( ` ${ contents . join ( ', ' ) } ` )
2753
+
2754
+ // Check if bin directory exists
2755
+ const binDir = join ( installPrefix , 'bin' )
2756
+ if ( existsSync ( binDir ) ) {
2757
+ log ( `🔍 Contents of ${ binDir } :` )
2758
+ const binContents = readdirSync ( binDir )
2759
+ log ( ` ${ binContents . join ( ', ' ) } ` )
2760
+ } else {
2761
+ log ( `❌ bin directory does not exist at ${ binDir } ` )
2762
+ }
2763
+ } else {
2764
+ log ( `❌ Install prefix directory does not exist: ${ installPrefix } ` )
2765
+ }
2766
+ }
2767
+
2717
2768
return installPrefix
2718
2769
}
2719
2770
0 commit comments