⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
local
/
src
/
imagick
/
util
/
View File Name :
calculate_cflags.php
<?php // Run with something like: // export CFLAGS=$(php util/calculate_cflags.php "8.1" "7.1.0-17") // where the first number is the PHP version, and the second number // is the ImageMagick version number if ($argc !== 3) { fwrite(STDERR, "usage php calculate_cflags.php \$PHP_VERSION \$IMAGEMAGICK_VERSION \n"); exit(-1); } $PHP_VERSION = $argv[1]; $IMAGEMAGICK_VERSION = $argv[2]; $message = sprintf( "Calculating for PHP_VERSION [%s] IMAGEMAGICK_VERSION [%s]\n", $PHP_VERSION, $IMAGEMAGICK_VERSION ); fwrite(STDERR, $message); $CFLAGS = array( "-Wno-deprecated-declarations", "-Werror", "-Wall", "-Wextra", "-Wimplicit-function-declaration", "-Wno-variadic-macros", "-Wformat" ); if (strpos($IMAGEMAGICK_VERSION, "7.1.1") === 0 || strpos($IMAGEMAGICK_VERSION, "git7") === 0) { // The definition of channel changed to be a non-negative number, which // results in this code: // // if (((ssize_t) channel < 0) || ((ssize_t) channel >= MaxPixelChannels)) // // giving this error: // error: comparison is always false due to limited range of data type [-Werror=type-limits] $CFLAGS[] = "-Wno-type-limits"; } if (strpos($IMAGEMAGICK_VERSION, "6") === 0 || strpos($IMAGEMAGICK_VERSION, "git6") === 0) { $CFLAGS[] = "-Wno-sign-compare"; $CFLAGS[] = "-Wno-unused-parameter"; } if (strpos($IMAGEMAGICK_VERSION, "6.8") === 0) { $CFLAGS = array("-Wno-deprecated-declarations"); } if (strpos($IMAGEMAGICK_VERSION, "6.9") === 0) { $CFLAGS[] = "-Wno-unused-variable"; } if ($PHP_VERSION == "5.6") { $CFLAGS = array( "-Wno-deprecated-declarations", "-Wdeclaration-after-statement", "-Werror", "-Wall", "-Wimplicit-function-declaration" ); } $result = implode(" ", $CFLAGS); echo $result; fwrite(STDERR, "Ok. CFLAGS are: $result\n");