- <meta name="robots" content="noindex,nofollow">
- <title>SquirrelMail configtest</title>
+ <meta name="robots" content="noindex,nofollow">
+ <title>SquirrelMail configtest</title>
if(!in_array('config.php', $included)) {
if(!file_exists(SM_PATH . 'config/config.php')) {
do_err('Config file '.SM_PATH . 'config/config.php does not exist!<br />'.
if(!in_array('config.php', $included)) {
if(!file_exists(SM_PATH . 'config/config.php')) {
do_err('Config file '.SM_PATH . 'config/config.php does not exist!<br />'.
}
do_err('Could not read '.SM_PATH.'config/config.php! Check file permissions.');
}
if(!in_array('strings.php', $included)) {
do_err('Could not include '.SM_PATH.'functions/strings.php!<br />'.
}
do_err('Could not read '.SM_PATH.'config/config.php! Check file permissions.');
}
if(!in_array('strings.php', $included)) {
do_err('Could not include '.SM_PATH.'functions/strings.php!<br />'.
sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);
if ((! isset($client_ip) || $client_ip!='127.0.0.1') &&
sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);
if ((! isset($client_ip) || $client_ip!='127.0.0.1') &&
do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.');
}
}
/* checking PHP specs */
echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b></td></tr>\n" .
do_err('Enable "Allow remote configtest" option in squirrelmail configuration in order to use this script.');
}
}
/* checking PHP specs */
echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b></td></tr>\n" .
- '<tr><td>Config file version:</td><td><b>' . $config_version . "</b></td></tr>\n" .
- '<tr><td>Config file last modified:</td><td><b>' .
- date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
- "</b></td></tr>\n</table>\n</p>\n\n";
+ '<tr><td>Config file version:</td><td><b>' . $config_version . "</b></td></tr>\n" .
+ '<tr><td>Config file last modified:</td><td><b>' .
+ date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
+ "</b></td></tr>\n</table>\n</p>\n\n";
if (isset($plugins[0])) {
foreach($plugins as $plugin) {
if(!file_exists(SM_PATH .'plugins/'.$plugin)) {
if (isset($plugins[0])) {
foreach($plugins as $plugin) {
if(!file_exists(SM_PATH .'plugins/'.$plugin)) {
- do_err('You have enabled the <i>'.$plugin.'</i> plugin but I cannot read its setup.php file.', FALSE);
- } elseif (in_array($plugin, $bad_plugins)) {
- do_err('You have enabled the <i>'.$plugin.'</i> plugin, which causes problems with this version of SquirrelMail. Please check the ReleaseNotes or other documentation for more information.', false);
- }
+ do_err('You have enabled the <i>'.$plugin.'</i> plugin, but I cannot read its setup.php file.', FALSE);
+ } elseif (in_array($plugin, $bad_plugins)) {
+ do_err('You have enabled the <i>'.$plugin.'</i> plugin, which causes problems with this version of SquirrelMail. Please check the ReleaseNotes or other documentation for more information.', false);
+ }
$loc_path = SM_PATH .'locale/'.$squirrelmail_default_language.'/LC_MESSAGES/squirrelmail.mo';
if( ! file_exists( $loc_path ) ) {
do_err('You have set <i>' . $squirrelmail_default_language .
$loc_path = SM_PATH .'locale/'.$squirrelmail_default_language.'/LC_MESSAGES/squirrelmail.mo';
if( ! file_exists( $loc_path ) ) {
do_err('You have set <i>' . $squirrelmail_default_language .
- '</i> as your default language, but I cannot find this translation (should be '.
- 'in <tt>' . $loc_path . '</tt>). Please note that you have to download translations '.
- 'separately from the main SquirrelMail package.', FALSE);
+ '</i> as your default language, but I cannot find this translation (should be '.
+ 'in <tt>' . $loc_path . '</tt>). Please note that you have to download translations '.
+ 'separately from the main SquirrelMail package.', FALSE);
} elseif ( ! is_readable( $loc_path ) ) {
do_err('You have set <i>' . $squirrelmail_default_language .
} elseif ( ! is_readable( $loc_path ) ) {
do_err('You have set <i>' . $squirrelmail_default_language .
- '</i> as your default language, but I cannot read this translation (file '.
- 'in <tt>' . $loc_path . '</tt> unreadable).', FALSE);
+ '</i> as your default language, but I cannot read this translation (file '.
+ 'in <tt>' . $loc_path . '</tt> unreadable).', FALSE);
echo $IND . "sendmail OK<br />\n";
} else {
$stream = fsockopen( ($use_smtp_tls==1?'tls://':'').$smtpServerAddress, $smtpPort,
echo $IND . "sendmail OK<br />\n";
} else {
$stream = fsockopen( ($use_smtp_tls==1?'tls://':'').$smtpServerAddress, $smtpPort,
}
// check for SMTP code; should be 2xx to allow us access
$smtpline = fgets($stream, 1024);
if(((int) $smtpline{0}) > 3) {
do_err("Error connecting to SMTP server. Server error: ".
}
// check for SMTP code; should be 2xx to allow us access
$smtpline = fgets($stream, 1024);
if(((int) $smtpline{0}) > 3) {
do_err("Error connecting to SMTP server. Server error: ".
$ehlo_error = false;
while ($line=fgets($stream, 1024)){
if (preg_match("/^250(-|\s)(\S*)\s+(\S.*)/",$line,$match)||
$ehlo_error = false;
while ($line=fgets($stream, 1024)){
if (preg_match("/^250(-|\s)(\S*)\s+(\S.*)/",$line,$match)||
/* POP before SMTP */
if($pop_before_smtp) {
$stream = fsockopen($smtpServerAddress, 110, $err_no, $err_str);
if (!$stream) {
do_err("Error connecting to POP Server ($smtpServerAddress:110) "
/* POP before SMTP */
if($pop_before_smtp) {
$stream = fsockopen($smtpServerAddress, 110, $err_no, $err_str);
if (!$stream) {
do_err("Error connecting to POP Server ($smtpServerAddress:110) "
}
$tmp = fgets($stream, 1024);
if (substr($tmp, 0, 3) != '+OK') {
do_err("Error connecting to POP Server ($smtpServerAddress:110)"
}
$tmp = fgets($stream, 1024);
if (substr($tmp, 0, 3) != '+OK') {
do_err("Error connecting to POP Server ($smtpServerAddress:110)"
/** Can we open a connection? */
$stream = fsockopen( ($use_imap_tls==1?'tls://':'').$imapServerAddress, $imapPort,
/** Can we open a connection? */
$stream = fsockopen( ($use_imap_tls==1?'tls://':'').$imapServerAddress, $imapPort,
}
/** Is the first response 'OK'? */
$imapline = fgets($stream, 1024);
if(substr($imapline, 0,4) != '* OK') {
}
/** Is the first response 'OK'? */
$imapline = fgets($stream, 1024);
if(substr($imapline, 0,4) != '* OK') {
fputs($stream, "A001 CAPABILITY\r\n");
$capline = '';
while ($line=fgets($stream, 1024)){
fputs($stream, "A001 CAPABILITY\r\n");
$capline = '';
while ($line=fgets($stream, 1024)){
$starttls_line=fgets($stream, 1024);
if (! preg_match("/^A002 OK.*/i",$starttls_line)) {
$imap_starttls_err = 'IMAP STARTTLS failed. Server replied: '
$starttls_line=fgets($stream, 1024);
if (! preg_match("/^A002 OK.*/i",$starttls_line)) {
$imap_starttls_err = 'IMAP STARTTLS failed. Server replied: '
do_err($imap_starttls_err);
} elseif (! stream_socket_enable_crypto($stream,true,STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
do_err('Failed to enable encryption on IMAP connection.');
do_err($imap_starttls_err);
} elseif (! stream_socket_enable_crypto($stream,true,STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
do_err('Failed to enable encryption on IMAP connection.');
if($imap_auth_mech == 'login' && stristr($capline, 'LOGINDISABLED') !== FALSE) {
do_err('Your server doesn\'t allow plaintext logins. '.
if($imap_auth_mech == 'login' && stristr($capline, 'LOGINDISABLED') !== FALSE) {
do_err('Your server doesn\'t allow plaintext logins. '.
- 'Try enabling another authentication mechanism like CRAM-MD5, DIGEST-MD5 or TLS-encryption '.
- 'in the SquirrelMail configuration.', FALSE);
+ 'Try enabling another authentication mechanism like CRAM-MD5, DIGEST-MD5 or TLS-encryption '.
+ 'in the SquirrelMail configuration.', FALSE);
- !strcmp(ini_get('safe_mode_allowed_env_vars'),'') ||
- preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars')) ) {
- echo "Webmail users can change their time zone settings.<br />\n";
+ !strcmp(ini_get('safe_mode_allowed_env_vars'),'') ||
+ preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars')) ) {
+ echo "Webmail users can change their time zone settings.<br />\n";
- 'dbase' => 'dbase_open',
- 'fbsql' => 'fbsql_connect',
- 'interbase' => 'ibase_connect',
- 'informix' => 'ifx_connect',
- 'msql' => 'msql_connect',
- 'mssql' => 'mssql_connect',
- 'mysql' => 'mysql_connect',
- 'mysqli' => 'mysqli_connect',
- 'oci8' => 'ocilogon',
- 'odbc' => 'odbc_connect',
- 'pgsql' => 'pg_connect',
- 'sqlite' => 'sqlite_open',
- 'sybase' => 'sybase_connect'
- );
+ 'dbase' => 'dbase_open',
+ 'fbsql' => 'fbsql_connect',
+ 'interbase' => 'ibase_connect',
+ 'informix' => 'ifx_connect',
+ 'msql' => 'msql_connect',
+ 'mssql' => 'mssql_connect',
+ 'mysql' => 'mysql_connect',
+ 'mysqli' => 'mysqli_connect',
+ 'oci8' => 'ocilogon',
+ 'odbc' => 'odbc_connect',
+ 'pgsql' => 'pg_connect',
+ 'sqlite' => 'sqlite_open',
+ 'sybase' => 'sybase_connect'
+ );
$dbh = DB::connect($dsn, true);
if (DB::isError($dbh)) {
do_err('Database error: '. htmlspecialchars(DB::errorMessage($dbh)) .
$dbh = DB::connect($dsn, true);
if (DB::isError($dbh)) {
do_err('Database error: '. htmlspecialchars(DB::errorMessage($dbh)) .
- echo '<p>No fatal errors were found, but there was at least 1 warning. Please check the flagged issue(s) carefully, as correcting them may prevent erratic, undefined, or incorrect behavior (or flat out breakage).</p>';
- echo $footer;
+ echo '<p>No fatal errors were found, but there was at least 1 warning. Please check the flagged issue(s) carefully, as correcting them may prevent erratic, undefined, or incorrect behavior (or flat out breakage).</p>';
+ echo $footer;
<p>Congratulations, your SquirrelMail setup looks fine to me!</p>
<p><a href="login.php">Login now</a></p>
<p>Congratulations, your SquirrelMail setup looks fine to me!</p>
<p><a href="login.php">Login now</a></p>