Source for file system_specs.php
Documentation is available at system_specs.php
* This script gathers system specification details for use with bug reporting
* and anyone else who needs it.
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: system_specs.php,v 1.16 2006/07/15 12:01:09 tokul Exp $
* do not allow to call this file directly
if ((isset
($_SERVER['SCRIPT_FILENAME']) &&
$_SERVER['SCRIPT_FILENAME'] == __FILE__
) ||
(isset
($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) &&
$HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__
) ) {
header("Location: ../../src/login.php");
* load required libraries
include_once(SM_PATH .
'functions/imap_general.php');
* converts array to string
* @param array $array array that has to be displayed
function Show_Array($array) {
foreach ($array as $key =>
$value) {
if ($key !=
0 ||
$value !=
'') {
$str .=
" * $key = $value\n";
return " * Nothing listed\n";
* converts plugin's array to string and adds version numbers
* @return string preformated text with installed plugin's information
function br_show_plugins() {
if (is_array($plugins) &&
$plugins!=
array()) {
foreach ($plugins as $key =>
$value) {
if ($key !=
0 ||
$value !=
'') {
$str .=
" * $key = $value";
// compatibility plugin can be used without need to enable it in sm config
&&
! in_array('compatibility',$plugins)) {
$str.=
' * compatibility';
include_once(SM_PATH .
'plugins/compatibility/setup.php');
return " * Nothing listed\n";
$HTTP_USER_AGENT=
"Browser information is not available.";
$body_top =
"My browser information:\n" .
' '.
$HTTP_USER_AGENT .
"\n" ;
$body_top .=
" get_browser() information (List)\n" .
Show_Array((array)
$browser);
$body_top .=
"\nMy web server information:\n" .
" PHP Extensions (List)\n" .
"\nSquirrelMail-specific information:\n" .
$warnings['ldap'] =
"LDAP server defined in SquirrelMail config, " .
"but the module is not loaded in PHP";
$corrections['ldap'][] =
"Reconfigure PHP with the option '--with-ldap'";
$corrections['ldap'][] =
"Then recompile PHP and reinstall";
$corrections['ldap'][] =
"-- OR --";
$corrections['ldap'][] =
"Reconfigure SquirrelMail to not use LDAP";
$body =
"\nMy IMAP server information:\n" .
" Server type: $imap_server_type\n";
$body.=
' Capabilities: ';
foreach ($imap_capabilities as $capability =>
$value) {
$body.=
$capability .
(is_bool($value) ?
' ' :
"=$value ");
$body .=
" Unable to connect to IMAP server to get information.\n";
$warnings['imap'] =
"Unable to connect to IMAP server";
$corrections['imap'][] =
"Make sure you specified the correct mail server";
$corrections['imap'][] =
"Make sure the mail server is running IMAP, not POP";
$corrections['imap'][] =
"Make sure the server responds to port $imapPort";
if (isset
($warning) &&
$warning) {
foreach ($warnings as $key =>
$value) {
$body_top .=
"WARNINGS WERE REPORTED WITH YOUR SETUP:\n";
$body_top =
"WARNINGS WERE REPORTED WITH YOUR SETUP -- SEE BELOW\n\n$body_top";
$warning_html =
"<h1>Warnings were reported with your setup:</h1>\n<dl>\n";
$warning_html .=
"<dt><b>$value</b></dt>\n";
$body_top .=
"\n$value\n";
foreach ($corrections[$key] as $corr_val) {
$body_top .=
" * $corr_val\n";
$warning_html .=
"<dd>* $corr_val</dd>\n";
$warning_html .=
"</dl>\n<p>$warning_num warning(s) reported.</p>\n<hr />\n";
$body_top .=
"\n$warning_num warning(s) reported.\n";
$body_top .=
"----------------------------------------------\n";
Documentation generated on Sat, 07 Oct 2006 16:13:53 +0300 by phpDocumentor 1.3.0RC6