check-php-prerequisites.php (846B)
1 <?php 2 /** 3 * This file does various pre-flight checks in order to make sure the installer can run 4 * and do additional tests. 5 * 6 * The pre-flight check will immediately die if json_encode/json_decode functions don't exist. 7 */ 8 9 /* json_encode/json_decode are the most important function, as we communicate via JSON */ 10 if (!function_exists('json_encode') || !function_exists('json_decode')) { 11 echo '{"success":false,"message":"Your PHP installation lacks the JSON functions, which is mandatory for PartKeepr.",'; 12 echo '"errors":["In order to run PartKeepr, you need to have the PHP JSON module activated. '; 13 echo '<a target=\"_blank\" href=\"https://wiki.partkeepr.org/wiki/KB00002:JSON_Functions\">Read moreā¦</a>"]}'; 14 exit; 15 } 16 17 $aChecks = []; 18 19 echo json_encode(['success' => true, 'message' => 'JSON functions present']); 20 exit;