3 * Test script for checking all requirements and optional PHP extensions for
4 * ext-autoreg. This is public domain software because I don't care what you do
7 * If this script sets your computer on fire or eats your children, it is your
8 * OWN risk to use this software, but it may not do this.
11 // Init counter variables
15 // Check for required base64_encode function
16 if (function_exists('base64_encode')) {
17 // Required function exist
18 print basename(__FILE__) . ': BASE-64 support detected. <font color="green">Good!</font><br />';
21 print basename(__FILE__) . ': BASE-64 support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
25 // Check for required urlencode function
26 if (function_exists('urlencode')) {
27 // Required function exist
28 print basename(__FILE__) . ': URL encode support detected. <font color="green">Good!</font><br />';
31 print basename(__FILE__) . ': URL encode support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
35 // Check for required gzcompress function
36 if (function_exists('gzcompress')) {
37 // Required function exist
38 print basename(__FILE__) . ': GZIP support detected. <font color="green">Good!</font><br />';
41 print basename(__FILE__) . ': GZIP support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
45 // Check for optional mcrypt_encrypt() function
46 if (function_exists('mcrypt_encrypt')) {
47 // Optional function found, good!
48 print basename(__FILE__) . ': mcrypt support detected. <font color="green">Good</font>!<br />';
51 // Not detected, not bad but would be good to have
52 print basename(__FILE__) . ': mcrypt support <strong>NOT</strong> detected. <font color="yellow">Fix me!</font><br />';
55 // Output total result
57 print 'Analysis summary: good=' . $good . ', bad=' . $bad . '<br />';
61 // Is something missing?
63 // Some required functions not found!
64 print '<font color="red">Failed!</<font>';
67 print '<font color="green">Passed!</font>';