@@ -549,12 +549,12 @@ function install($options)
549549 $ tar_gz_suffix = "" ; // retry with the full archive if the original download failed
550550 }
551551 }
552- if (!IS_WINDOWS || ` where tar 2> nul ` !== null ) {
552+ if (!IS_WINDOWS || shell_exec ( " where tar 2> nul " ) !== null ) {
553553 execute_or_exit (
554554 "Cannot extract the archive " ,
555555 "tar -xf " . escapeshellarg ($ tmpDirTarGz ) . " -C " . escapeshellarg ($ tmpDir )
556556 );
557- } elseif (($ defaultPath = ` where 7z 2> nul ` ) !== null || @is_dir ($ installDir7z = getenv ("PROGRAMFILES " ) . "\\7-Zip " )) {
557+ } elseif (($ defaultPath = shell_exec ( " where 7z 2> nul " ) ) !== null || @is_dir ($ installDir7z = getenv ("PROGRAMFILES " ) . "\\7-Zip " )) {
558558 if ($ defaultPath === null ) {
559559 putenv ("PATH= " . getenv ("PATH " ) . "; $ installDir7z " );
560560 }
@@ -638,7 +638,13 @@ function install($options)
638638 // Trace
639639 $ extensionRealPath = "$ tmpArchiveTraceRoot/ext/ $ extensionVersion/ "
640640 . EXTENSION_PREFIX . "ddtrace $ extensionSuffix. " . EXTENSION_SUFFIX ;
641+
642+ $ extensionRealPath2 = "$ tmpArchiveTraceRoot " ;
643+ if (!file_exists ($ extensionRealPath )) {
644+ var_dump ("ALED " );
645+ }
641646 if (!file_exists ($ extensionRealPath )) {
647+ var_dump ($ extensionRealPath );
642648 print_error_and_exit (substr ($ extensionSuffix ?: '-nts ' , 1 )
643649 . ' builds of PHP ' . $ phpProperties [PHP_VER ] . ' are currently not supported ' );
644650 }
@@ -1541,7 +1547,12 @@ function download($url, $destination, $retry = false)
15411547 // PHP doesn't like too long location headers, and on PHP 7.3 and older they weren't read at all.
15421548 // But this only really matters for CircleCI artifacts, so not too bad.
15431549 if ($ data == "" ) {
1544- foreach ($ http_response_header as $ header ) {
1550+ if (PHP_VERSION_ID >= 80500 ) {
1551+ $ headers = http_get_last_response_headers ();
1552+ } else {
1553+ $ headers = $ http_response_header ;
1554+ }
1555+ foreach ($ headers as $ header ) {
15451556 if (stripos ($ header , "location: " ) === 0 ) {
15461557 $ data = file_get_contents (substr ($ header , 10 ));
15471558 goto got_data;
0 commit comments