Skip to content

Commit

Permalink
udate download-php-src-archive.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jan 12, 2025
1 parent ead0835 commit a320895
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sapi/scripts/download-php-src-archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
if (!file_exists($php_archive_file)) {
`test -d {$download_dir} || mkdir -p {$download_dir}`;
$download_php_counter++;
if ($download_php_counter > 3) {
throw new \Exception('curl download php archive Exception!', 500);
}
`{$download_cmd}`;
}

$hash = hash_file('sha256', $php_archive_file);
echo "sha256sum: " . $hash . PHP_EOL;
if ($hash !== $php_archive_file_sha256sum) {
if ($download_php_counter > 3) {
throw new \Exception('curl download php archive Exception!', 500);
}
echo 'archive sha256sum mismatched , will download ' . PHP_EOL;
unlink($php_archive_file);
goto DOWNLOAD_PHP;
Expand Down

0 comments on commit a320895

Please sign in to comment.