diff --git a/includes/lib_remote.php b/includes/lib_remote.php index aafb450e..1f206cbb 100644 --- a/includes/lib_remote.php +++ b/includes/lib_remote.php @@ -24,6 +24,24 @@ require_once("Crypt/XXTEA.php"); +if (!defined('GSP_XMLRPC_READY')) { + if (!function_exists('xmlrpc_encode_request') || !function_exists('xmlrpc_decode')) { + $message = "GSP requires the PHP xmlrpc extension for agent communication.\n". + "Install the php-xmlrpc package for your PHP version (example: sudo apt install php8.3-xmlrpc on Ubuntu 24.04 or use PECL).\n". + "See https://www.php.net/manual/en/book.xmlrpc.php for installation instructions."; + if (PHP_SAPI === 'cli') { + fwrite(STDERR, $message . PHP_EOL); + } else { + if (!headers_sent()) { + header('Content-Type: text/plain; charset=UTF-8', true, 500); + } + echo nl2br(htmlentities($message)); + } + exit(1); + } + define('GSP_XMLRPC_READY', true); +} + // Screen type for servers define("OGP_SCREEN_TYPE_HOME","HOME"); define("OGP_SCREEN_TYPE_UPDATE","UPDATE"); diff --git a/modules/billing/admin.php b/modules/billing/admin.php index 7512ab87..8139bcfe 100644 --- a/modules/billing/admin.php +++ b/modules/billing/admin.php @@ -1,7 +1,7 @@ + diff --git a/modules/billing/invoices.php b/modules/billing/invoices.php index b11c6145..ef1ff88d 100644 --- a/modules/billing/invoices.php +++ b/modules/billing/invoices.php @@ -1,7 +1,7 @@ 0) { - \ No newline at end of file + diff --git a/modules/billing/return.php b/modules/billing/return.php index cdb3f314..922f20b0 100644 --- a/modules/billing/return.php +++ b/modules/billing/return.php @@ -1,5 +1,5 @@ \ No newline at end of file +?> diff --git a/modules/billing/webhook.php b/modules/billing/webhook.php index cf628247..b51c95e5 100644 --- a/modules/billing/webhook.php +++ b/modules/billing/webhook.php @@ -1,5 +1,5 @@