+function check_keys() {
+
+ $o = '';
+
+ $res = false;
+
+ if(function_exists('openssl_pkey_new'))
+ $res=openssl_pkey_new(array(
+ 'digest_alg' => 'sha1',
+ 'private_key_bits' => 4096,
+ 'encrypt_key' => false ));
+
+ // Get private key
+
+ if(! $res) {
+ $o .= t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys') . EOL;
+ $o .= t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".') . EOL;
+ }
+ return $o;
+
+}
+
+
+function check_funcs() {
+ if((function_exists('apache_get_modules')) && (! in_array('mod_rewrite',apache_get_modules())))
+ notice( t('Error: Apache webserver mod-rewrite module is required but not installed.') . EOL);
+ if(! function_exists('curl_init'))
+ notice( t('Error: libCURL PHP module required but not installed.') . EOL);
+ if(! function_exists('imagecreatefromjpeg'))
+ notice( t('Error: GD graphics PHP module with JPEG support required but not installed.') . EOL);
+ if(! function_exists('openssl_public_encrypt'))
+ notice( t('Error: openssl PHP module required but not installed.') . EOL);
+ if(! function_exists('mysqli_connect'))
+ notice( t('Error: mysqli PHP module required but not installed.') . EOL);
+ if(! function_exists('mb_strlen'))
+ notice( t('Error: mb_string PHP module required but not installed.') . EOL);
+
+ if((x($_SESSION,'sysmsg')) && strlen($_SESSION['sysmsg']))
+ notice( t('Please see the file "INSTALL.txt".') . EOL);
+}
+
+