squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

configtest.php
Go to the documentation of this file.
1 <?php
2 
13 /************************************************************
14  * NOTE: you do not need to change this script! *
15  * If it throws errors you need to adjust your config. *
16  ************************************************************/
17 
18 function do_err($str, $exit = TRUE) {
19  global $IND;
20  echo '<p>'.$IND.'<font color="red"><b>ERROR:</b></font> ' .$str. "</p>\n";
21  if($exit) {
22  echo '</body></html>';
23  exit;
24  }
25 }
26 
27 ob_implicit_flush();
29 define('PAGE_NAME', 'configtest');
30 
32 define('SM_PATH', '../');
33 
34 /*
35  * Load config before output begins.
36  * functions/global.php cleans environment, then loads
37  * functions/strings.php and config/config.php
38  */
39 if (file_exists(SM_PATH . 'config/config.php')) {
40  include(SM_PATH . 'functions/global.php');
41 }
42 $IND = str_repeat('&nbsp;',4);
43 
44 // this must be done before the output is started because it may use the
45 // session
47 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
48 <html>
49 <head>
50  <meta name="robots" content="noindex,nofollow">
51  <title>SquirrelMail configtest</title>
52 </head>
53 <body>
54 <h1>SquirrelMail configtest</h1>
55 
56 <p>This script will try to check some aspects of your SquirrelMail configuration
57 and point you to errors whereever it can find them. You need to go run <tt>conf.pl</tt>
58 in the <tt>config/</tt> directory first before you run this script.</p>
59 
60 <?php
61 
62 $included = array_map('basename', get_included_files() );
63 if(!in_array('config.php', $included)) {
64  if(!file_exists(SM_PATH . 'config/config.php')) {
65  do_err('Config file '.SM_PATH . 'config/config.php does not exist!<br />'.
66  'You need to run <tt>conf.pl</tt> first.');
67  }
68  do_err('Could not read '.SM_PATH.'config/config.php! Check file permissions.');
69 }
70 if(!in_array('strings.php', $included)) {
71  do_err('Could not include '.SM_PATH.'functions/strings.php!<br />'.
72  'Check permissions on that file.');
73 }
74 
75 /* checking PHP specs */
76 
77 echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b></td></tr>\n" .
78  '<tr><td>Config file version:</td><td><b>' . $config_version . "</b></td></tr>\n" .
79  '<tr><td>Config file last modified:</td><td><b>' .
80  date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
81  "</b></td></tr>\n</table>\n</p>\n\n";
82 
83 echo "Checking PHP configuration...<br />\n";
84 
85 if(!check_php_version(4,1,0)) {
86  do_err('Insufficient PHP version: '. PHP_VERSION . '! Minimum required: 4.1.0');
87 }
88 
89 echo $IND . 'PHP version ' . PHP_VERSION . " OK.<br />\n";
90 
91 // try to determine information about the user and group the web server is running as
92 //
93 $webOwnerID = 'N/A';
94 $webOwnerInfo = array('name' => 'N/A');
95 if (function_exists('posix_getuid'))
96  $webOwnerID = posix_getuid();
97 if ($webOwnerID === FALSE)
98  $webOwnerID = 'N/A';
99 if ($webOwnerID !== 'N/A' && function_exists('posix_getpwuid'))
100  $webOwnerInfo = posix_getpwuid($webOwnerID);
101 if (!$webOwnerInfo)
102  $webOwnerInfo = array('name' => 'N/A');
103 $webGroupID = 'N/A';
104 $webGroupInfo = array('name' => 'N/A');
105 if (function_exists('posix_getgid'))
106  $webGroupID = posix_getgid();
107 if ($webGroupID === FALSE)
108  $webGroupID = 'N/A';
109 if ($webGroupID !== 'N/A' && function_exists('posix_getgrgid'))
110  $webGroupInfo = posix_getgrgid($webGroupID);
111 if (!$webGroupInfo)
112  $webGroupInfo = array('name' => 'N/A');
113 
114 echo $IND . 'Running as ' . $webOwnerInfo['name'] . '(' . $webOwnerID
115  . ') / ' . $webGroupInfo['name'] . '(' . $webGroupID . ")<br />\n";
116 
117 echo $IND . 'display_errors: ' . ini_get('display_errors') . "<br />\n";
118 
119 echo $IND . 'error_reporting: ' . ini_get('error_reporting') . "<br />\n";
120 
121 if ((bool) ini_get('session.auto_start') && ini_get('session.auto_start') != 'off') {
122  $msg = 'session.auto_start is turned on in your PHP configuration, but SquirrelMail'
123  . ' 1.4.x will not work with it (otherwise valid logins will usually'
124  . ' result in "You must be logged in to access this page" errors).'
125  . ' You can disable session.auto_start only in the squirrelmail directory'
126  . ' if you need to leave it turned on for other applications.';
127  do_err($msg, true);
128 }
129 
130 $safe_mode = ini_get('safe_mode');
131 if ($safe_mode) {
132  echo $IND . 'safe_mode: ' . $safe_mode;
133  if (empty($prefs_dsn) || empty($addrbook_dsn))
134  echo ' (<font color="red">double check data and attachment directory ownership, etc!</font>)';
135  if (!empty($addrbook_dsn) || !empty($prefs_dsn) || !empty($addrbook_global_dsn))
136  echo ' (<font color="red">does PHP have access to database interface?</font>)';
137  echo "<br />\n";
138  $safe_mode_exec_dir = ini_get('safe_mode_exec_dir');
139  echo $IND . 'safe_mode_exec_dir: ' . $safe_mode_exec_dir . "<br />\n";
140 }
141 
142 /* variables_order check */
143 
144 // FIXME(?): Hmm, how do we distinguish between when an ini setting is
145 // not available (ini_set() returns empty string) and when
146 // the administrator set the value to an empty string? The
147 // latter is sure to be highly rare, so for now, just assume
148 // that empty value means the setting isn't even available
149 // (could also check PHP version when this setting was implemented)
150 // although, we'll also warn the user if it is empty, with
151 // a non-fatal error
152 $variables_order = strtoupper(ini_get('variables_order'));
153 if (empty($variables_order))
154  do_err('Your variables_order setting seems to be empty. Make sure it is undefined in any PHP ini files, .htaccess files, etc. and not specifically set to an empty value or SquirrelMail may not function correctly', false);
155 else if (strpos($variables_order, 'G') === FALSE
156  || strpos($variables_order, 'P') === FALSE
157  || strpos($variables_order, 'C') === FALSE
158  || strpos($variables_order, 'S') === FALSE) {
159  do_err('Your variables_order setting is insufficient for SquirrelMail to function. It needs at least "GPCS", but you have it set to "' . htmlspecialchars($variables_order) . '"', true);
160 } else {
161  echo $IND . "variables_order OK: $variables_order.<br />\n";
162 }
163 
164 
165 /* gpc_order check (removed from PHP as of v5.0) */
166 
167 if (!check_php_version(5)) {
168  // FIXME(?): Hmm, how do we distinguish between when an ini setting is
169  // not available (ini_set() returns empty string) and when
170  // the administrator set the value to an empty string? The
171  // latter is sure to be highly rare, so for now, just assume
172  // that empty value means the setting isn't even available
173  // (could also check PHP version when this setting was implemented)
174  // although, we'll also warn the user if it is empty, with
175  // a non-fatal error
176  $gpc_order = strtoupper(ini_get('gpc_order'));
177  if (empty($gpc_order))
178  do_err('Your gpc_order setting seems to be empty. Make sure it is undefined in any PHP ini files, .htaccess files, etc. and not specifically set to an empty value or SquirrelMail may not function correctly', false);
179  else if (strpos($gpc_order, 'G') === FALSE
180  || strpos($gpc_order, 'P') === FALSE
181  || strpos($gpc_order, 'C') === FALSE) {
182  do_err('Your gpc_order setting is insufficient for SquirrelMail to function. It needs to be set to "GPC", but you have it set to "' . htmlspecialchars($gpc_order) . '"', true);
183  } else {
184  echo $IND . "gpc_order OK: $gpc_order.<br />\n";
185  }
186 }
187 
188 
189 $php_exts = array('session','pcre');
190 $diff = array_diff($php_exts, get_loaded_extensions());
191 if(count($diff)) {
192  do_err('Required PHP extensions missing: '.implode(', ',$diff) );
193 }
194 
195 echo $IND . "PHP extensions OK. Dynamic loading is ";
196 
197 if (!(bool)ini_get('enable_dl') || (bool)ini_get('safe_mode')) {
198  echo "disabled.<br />\n";
199 } else {
200  echo "enabled.<br />\n";
201 }
202 
203 
204 /* dangerous php settings */
206 if (function_exists('mb_internal_encoding') &&
207  check_php_version(4,2,0) &&
208  (int)ini_get('mbstring.func_overload')!=0) {
209  $mb_error='You have enabled mbstring overloading.'
210  .' It can cause problems with SquirrelMail scripts that rely on single byte string functions.';
211  do_err($mb_error);
212 }
213 
221 if ((bool) ini_get('register_globals') &&
222  ini_get('register_globals') != 'off') {
223  $rg_error='You have enabled PHP register_globals.'
224  .' Running PHP installation with register_globals=on can cause problems.'
225  .' See <a href="http://www.php.net/manual/en/security.registerglobals.php">'
226  .'security information about register_globals</a>.';
227  do_err($rg_error,false);
228 }
229 
233 if ( (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime()) ||
234  (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) ||
235  ( (bool) ini_get('magic_quotes_sybase') && ini_get('magic_quotes_sybase') != 'off' )
236  ) {
237  $magic_quotes_warning='You have enabled any one of <tt>magic_quotes_runtime</tt>, '
238  .'<tt>magic_quotes_gpc</tt> or <tt>magic_quotes_sybase</tt> in your PHP '
239  .'configuration. We recommend all those settings to be off. SquirrelMail '
240  .'may work with them on, but when experiencing stray backslashes in your mail '
241  .'or other strange behaviour, it may be advisable to turn them off.';
242  do_err($magic_quotes_warning,false);
243 }
244 
245 if (ini_get('short_open_tag') == 0) {
246  $short_open_tag_warning = 'You have configured PHP not to allow short tags '
247  . '(<tt>short_open_tag=off</tt>). This shouldn\'t be a problem with '
248  . 'SquirrelMail or any plugin coded coded according to the '
249  . 'SquirrelMail Coding Guidelines, but if you experience problems with '
250  . 'PHP code being displayed in some of the pages and changing setting '
251  . 'to "on" solves the problem, please file a bug report against the '
252  . 'failing plugin. The correct contact information is most likely '
253  . 'to be found in the plugin documentation.';
254  do_err($short_open_tag_warning, false);
255 }
256 
257 /* checking paths */
258 
259 echo "Checking paths...<br />\n";
260 
261 if(!file_exists($data_dir)) {
262  do_err("Data dir ($data_dir) does not exist!");
263 }
264 if(!is_dir($data_dir)) {
265  do_err("Data dir ($data_dir) is not a directory!");
266 }
267 // datadir should be executable - but no clean way to test on that
268 if(!is_writable($data_dir)) {
269  do_err("I cannot write to data dir ($data_dir)!");
270 }
271 
272 // todo_ornot: actually write something and read it back.
273 echo $IND . "Data dir OK.<br />\n";
274 
275 
276 if($data_dir == $attachment_dir) {
277  echo $IND . "Attachment dir is the same as data dir.<br />\n";
278 } else {
279  if(!file_exists($attachment_dir)) {
280  do_err("Attachment dir ($attachment_dir) does not exist!");
281  }
282  if (!is_dir($attachment_dir)) {
283  do_err("Attachment dir ($attachment_dir) is not a directory!");
284  }
285  if (!is_writable($attachment_dir)) {
286  do_err("I cannot write to attachment dir ($attachment_dir)!");
287  }
288  echo $IND . "Attachment dir OK.<br />\n";
289 }
290 
291 
292 /* check plugins and themes */
293 if (isset($plugins[0])) {
294  foreach($plugins as $plugin) {
295  if(!file_exists(SM_PATH .'plugins/'.$plugin)) {
296  do_err('You have enabled the <i>'.$plugin.'</i> plugin, but I cannot find it.', FALSE);
297  } elseif (!is_readable(SM_PATH .'plugins/'.$plugin.'/setup.php')) {
298  do_err('You have enabled the <i>'.$plugin.'</i> plugin, but I cannot read its setup.php file.', FALSE);
299  }
300  }
301  // load plugin functions
302  include_once(SM_PATH . 'functions/plugin.php');
303  // turn on output buffering in order to prevent output of new lines
304  ob_start();
305  foreach ($plugins as $name) {
306  use_plugin($name);
307  }
308  // get output and remove whitespace
309  $output = trim(ob_get_contents());
310  ob_end_clean();
311  // if plugins output more than newlines and spacing, stop script execution.
312  if (!empty($output)) {
313  $plugin_load_error = 'Some output is produced when plugins are loaded. Usually this means there is an error in one of the plugin setup or configuration files. The output was: '.htmlspecialchars($output);
314  do_err($plugin_load_error);
315  }
320  $plugin_err = boolean_hook_function('configtest', NULL, 1);
321  if($plugin_err) {
322  do_err('Some plugin tests failed.');
323  } else {
324  echo $IND . "Plugins OK.<br />\n";
325  }
326 } else {
327  echo $IND . "Plugins are not enabled in config.<br />\n";
328 }
329 foreach($theme as $thm) {
330  if(!file_exists($thm['PATH'])) {
331  do_err('You have enabled the <i>'.$thm['NAME'].'</i> theme but I cannot find it ('.$thm['PATH'].').', FALSE);
332  } elseif(!is_readable($thm['PATH'])) {
333  do_err('You have enabled the <i>'.$thm['NAME'].'</i> theme but I cannot read it ('.$thm['PATH'].').', FALSE);
334  }
335 }
336 
337 echo $IND . "Themes OK.<br />\n";
338 
339 if ( $squirrelmail_default_language != 'en_US' ) {
340  $loc_path = SM_PATH .'locale/'.$squirrelmail_default_language.'/LC_MESSAGES/squirrelmail.mo';
341  if( ! file_exists( $loc_path ) ) {
342  do_err('You have set <i>' . $squirrelmail_default_language .
343  '</i> as your default language, but I cannot find this translation (should be '.
344  'in <tt>' . $loc_path . '</tt>). Please note that you have to download translations '.
345  'separately from the main SquirrelMail package.', FALSE);
346  } elseif ( ! is_readable( $loc_path ) ) {
347  do_err('You have set <i>' . $squirrelmail_default_language .
348  '</i> as your default language, but I cannot read this translation (file '.
349  'in <tt>' . $loc_path . '</tt> unreadable).', FALSE);
350  } else {
351  echo $IND . "Default language OK.<br />\n";
352  }
353 } else {
354  echo $IND . "Default language OK.<br />\n";
355 }
356 
357 echo $IND . "Base URL detected as: <tt>" . htmlspecialchars($test_location) .
358  "</tt> (location base " . (empty($config_location_base) ? 'autodetected' : 'set to <tt>' .
359  htmlspecialchars($config_location_base)."</tt>") . ")<br />\n";
360 
361 /* check outgoing mail */
362 
364  if(!check_php_version(4,3,0)) {
365  do_err('You need at least PHP 4.3.0 for SMTP/IMAP TLS!');
366  }
367  if(!extension_loaded('openssl')) {
368  do_err('You need the openssl PHP extension to use SMTP/IMAP TLS!');
369  }
370 }
371 
372 echo "Checking outgoing mail service....<br />\n";
373 
374 if($useSendmail) {
375  // is_executable also checks for existance, but we want to be as precise as possible with the errors
376  if(!file_exists($sendmail_path)) {
377  do_err("Location of sendmail program incorrect ($sendmail_path)!");
378  }
379  if(!is_executable($sendmail_path)) {
380  do_err("I cannot execute the sendmail program ($sendmail_path)!");
381  }
382 
383  echo $IND . "sendmail OK<br />\n";
384 } else {
385  $stream = fsockopen( ($use_smtp_tls?'tls://':'').$smtpServerAddress, $smtpPort,
386  $errorNumber, $errorString);
387  if(!$stream) {
388  do_err("Error connecting to SMTP server \"$smtpServerAddress:$smtpPort\".".
389  "Server error: ($errorNumber) ".htmlspecialchars($errorString));
390  }
391 
392  // check for SMTP code; should be 2xx to allow us access
393  $smtpline = fgets($stream, 1024);
394  if(((int) $smtpline{0}) > 3) {
395  do_err("Error connecting to SMTP server. Server error: ".
396  htmlspecialchars($smtpline));
397  }
398 
399  fputs($stream, 'QUIT');
400  fclose($stream);
401  echo $IND . 'SMTP server OK (<tt><small>'.
402  trim(htmlspecialchars($smtpline))."</small></tt>)<br />\n";
403 
404  /* POP before SMTP */
405  if($pop_before_smtp) {
407  $stream = fsockopen($pop_before_smtp_host, 110, $err_no, $err_str);
408  if (!$stream) {
409  do_err("Error connecting to POP Server ($pop_before_smtp_host:110) "
410  . $err_no . ' : ' . htmlspecialchars($err_str));
411  }
412 
413  $tmp = fgets($stream, 1024);
414  if (substr($tmp, 0, 3) != '+OK') {
415  do_err("Error connecting to POP Server ($pop_before_smtp_host:110)"
416  . ' '.htmlspecialchars($tmp));
417  }
418  fputs($stream, 'QUIT');
419  fclose($stream);
420  echo $IND . "POP-before-SMTP OK.<br />\n";
421  }
422 }
423 
427 echo "Checking IMAP service....<br />\n";
428 
430 $stream = fsockopen( ($use_imap_tls?'tls://':'').$imapServerAddress, $imapPort,
431  $errorNumber, $errorString);
432 if(!$stream) {
433  do_err("Error connecting to IMAP server \"$imapServerAddress:$imapPort\".".
434  "Server error: ($errorNumber) ".
435  htmlspecialchars($errorString));
436 }
437 
439 $imapline = fgets($stream, 1024);
440 if(substr($imapline, 0,4) != '* OK') {
441  do_err('Error connecting to IMAP server. Server error: '.
442  htmlspecialchars($imapline));
443 }
444 
445 echo $IND . 'IMAP server ready (<tt><small>'.
446  htmlspecialchars(trim($imapline))."</small></tt>)<br />\n";
447 
449 fputs($stream, "A001 CAPABILITY\r\n");
450 $capline = fgets($stream, 1024);
451 
452 echo $IND . 'Capabilities: <tt>'.htmlspecialchars($capline)."</tt><br />\n";
453 
454 if($imap_auth_mech == 'login' && stristr($capline, 'LOGINDISABLED') !== FALSE) {
455  do_err('Your server doesn\'t allow plaintext logins. '.
456  'Try enabling another authentication mechanism like CRAM-MD5, DIGEST-MD5 or TLS-encryption '.
457  'in the SquirrelMail configuration.', FALSE);
458 }
459 
460 if (stristr($capline, 'XMAGICTRASH') !== false) {
461  $magic_trash = 'It looks like IMAP_MOVE_EXPUNGE_TO_TRASH option is turned on '
462  .'in your Courier IMAP configuration. Courier does not provide tools that '
463  .'allow to detect folder used for Trash or commands are not documented. '
464  .'SquirrelMail can\'t detect special trash folder. SquirrelMail manages '
465  .'all message deletion or move operations internally and '
466  .'IMAP_MOVE_EXPUNGE_TO_TRASH option can cause errors in message and '
467  .'folder management operations. Please turn off IMAP_MOVE_EXPUNGE_TO_TRASH '
468  .'option in Courier imapd configuration.';
469  do_err($magic_trash,false);
470 }
471 
472 /* add warning about IMAP delivery */
473 if (stristr($capline, 'XCOURIEROUTBOX') !== false) {
474  $courier_outbox = 'OUTBOX setting is enabled in your Courier imapd '
475  .'configuration. SquirrelMail uses standard SMTP protocol or sendmail '
476  .'binary to send emails. Courier IMAP delivery method is not supported'
477  .' and can create duplicate email messages.';
478  do_err($courier_outbox,false);
479 }
480 
482 fputs($stream, "A002 LOGOUT\r\n");
483 fclose($stream);
484 
485 echo "Checking internationalization (i18n) settings...<br />\n";
486 echo "$IND gettext - ";
487 if (function_exists('gettext')) {
488  echo 'Gettext functions are available.'
489  .' On some systems you must have appropriate system locales compiled.'
490  ."<br />\n";
491 } else {
492  echo 'Gettext functions are unavailable.'
493  .' SquirrelMail will use slower internal gettext functions.'
494  ."<br />\n";
495 }
496 echo "$IND mbstring - ";
497 if (function_exists('mb_detect_encoding')) {
498  echo "Mbstring functions are available.<br />\n";
499 } else {
500  echo 'Mbstring functions are unavailable.'
501  ." Japanese translation won't work.<br />\n";
502 }
503 echo "$IND recode - ";
504 if (function_exists('recode')) {
505  echo "Recode functions are available.<br />\n";
506 } elseif (isset($use_php_recode) && $use_php_recode) {
507  echo "Recode functions are unavailable.<br />\n";
508  do_err('Your configuration requires recode support, but recode support is missing.');
509 } else {
510  echo "Recode functions are unavailable.<br />\n";
511 }
512 echo "$IND iconv - ";
513 if (function_exists('iconv')) {
514  echo "Iconv functions are available.<br />\n";
515 } elseif (isset($use_php_iconv) && $use_php_iconv) {
516  echo "Iconv functions are unavailable.<br />\n";
517  do_err('Your configuration requires iconv support, but iconv support is missing.');
518 } else {
519  echo "Iconv functions are unavailable.<br />\n";
520 }
521 // same test as in include/validate.php
522 echo "$IND timezone - ";
523 if ( (!ini_get('safe_mode')) ||
524  !strcmp(ini_get('safe_mode_allowed_env_vars'),'') ||
525  preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars')) ) {
526  echo "Webmail users can change their time zone settings.<br />\n";
527 } else {
528  echo "Webmail users can't change their time zone settings.<br />\n";
529 }
530 
531 // Pear DB tests
532 echo "Checking database functions...<br />\n";
533 if(!empty($addrbook_dsn) || !empty($prefs_dsn) || !empty($addrbook_global_dsn)) {
534  @include_once('DB.php');
535  if (class_exists('DB')) {
536  echo "$IND PHP Pear DB support is present.<br />\n";
537  $db_functions=array(
538  'dbase' => 'dbase_open',
539  'fbsql' => 'fbsql_connect',
540  'interbase' => 'ibase_connect',
541  'informix' => 'ifx_connect',
542  'msql' => 'msql_connect',
543  'mssql' => 'mssql_connect',
544  'mysql' => 'mysql_connect',
545  'mysqli' => 'mysqli_connect',
546  'oci8' => 'ocilogon',
547  'odbc' => 'odbc_connect',
548  'pgsql' => 'pg_connect',
549  'sqlite' => 'sqlite_open',
550  'sybase' => 'sybase_connect'
551  );
552 
553  $dsns = array();
554  if($prefs_dsn) {
555  $dsns['preferences'] = $prefs_dsn;
556  }
557  if($addrbook_dsn) {
558  $dsns['addressbook'] = $addrbook_dsn;
559  }
561  $dsns['global addressbook'] = $addrbook_global_dsn;
562  }
563 
564  foreach($dsns as $type => $dsn) {
565  $aDsn = explode(':', $dsn);
566  $dbtype = array_shift($aDsn);
567 
568  if(isset($db_functions[$dbtype]) && function_exists($db_functions[$dbtype])) {
569  echo "$IND$dbtype database support present.<br />\n";
570  } elseif(!(bool)ini_get('enable_dl') || (bool)ini_get('safe_mode')) {
571  do_err($dbtype.' database support not present!');
572  } else {
573  // Non-fatal error
574  do_err($dbtype.' database support not present or not configured!
575  Trying to dynamically load '.$dbtype.' extension.
576  Please note that it is advisable to not rely on dynamic loading of extensions.', FALSE);
577  }
578 
579 
580  // now, test this interface:
581 
582  $dbh = DB::connect($dsn, true);
583  if (DB::isError($dbh)) {
584  do_err('Database error: '. htmlspecialchars(DB::errorMessage($dbh)) .
585  ' in ' .$type .' DSN.');
586  }
587  $dbh->disconnect();
588  echo "$IND$type database connect successful.<br />\n";
589  }
590  } else {
591  $db_error='Required PHP PEAR DB support is not available.'
592  .' Is PEAR installed and is the include path set correctly to find <tt>DB.php</tt>?'
593  .' The include path is now: "<tt>' . ini_get('include_path') . '</tt>".';
594  do_err($db_error);
595  }
596 } else {
597  echo $IND."not using database functionality.<br />\n";
598 }
599 ?>
600 
601 <p>Congratulations, your SquirrelMail setup looks fine to me!</p>
602 
603 <p><a href="login.php">Login now</a></p>
604 
605 </body>
606 </html>
elseif
if(! sqgetGlobalVar('sound', $sound, SQ_GET)) elseif($sound=='(none)')
Definition: testsound.php:25
$useSendmail
$useSendmail
Definition: config_default.php:140
$variables_order
if($safe_mode) $variables_order
Definition: configtest.php:151
$sendmail_path
$sendmail_path
Definition: config_default.php:180
$imapServerAddress
$imapServerAddress
Definition: config_default.php:202
$imap_auth_mech
$imap_auth_mech
Definition: config_default.php:285
$squirrelmail_default_language
$squirrelmail_default_language
Definition: config_default.php:1012
$data_dir
$data_dir
Definition: config_default.php:499
$capline
$capline
Definition: configtest.php:449
$webOwnerInfo
$webOwnerInfo
Definition: configtest.php:93
html
Definition: html.class.php:18
$pop_before_smtp_host
$pop_before_smtp_host
Definition: config_default.php:321
$imapline
if(! $stream) $imapline
Definition: configtest.php:438
$use_imap_tls
$use_imap_tls
Definition: config_default.php:240
$gpc_order
if(empty($variables_order)) do_err('Your variables_order setting seems to be empty. Make sure it is undefined in any PHP ini files htaccess etc and not specifically set to an empty value or SquirrelMail may not function correctly G P C S Your variables_order setting is insufficient for SquirrelMail to function It needs at least but you have it set to t even available $gpc_order
Definition: configtest.php:175
$plugins
global $plugins
Definition: plugin.php:196
$webGroupID
$webGroupID
Definition: configtest.php:102
$theme
$theme[0]['PATH']
Definition: config_default.php:702
$output
$output
Definition: webmail.php:71
$prefs_dsn
$prefs_dsn
Definition: config_default.php:970
use_plugin
use_plugin($name)
Definition: plugin.php:27
$smtpPort
$smtpPort
Definition: config_default.php:151
$addrbook_dsn
$addrbook_dsn
Definition: config_default.php:965
$config_version
global $config_version
Definition: config_default.php:27
$attachment_dir
$attachment_dir
Definition: config_default.php:517
$use_smtp_tls
$use_smtp_tls
Definition: config_default.php:249
$webOwnerID
$webOwnerID
Definition: configtest.php:92
$webGroupInfo
$webGroupInfo
Definition: configtest.php:103
check_php_version
if(function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) check_php_version($a='0', $b='0', $c='0')
Definition: global.php:194
$smtpServerAddress
$smtpServerAddress
Definition: config_default.php:146
do_err
do_err($str, $exit=TRUE)
Definition: configtest.php:17
exit
exit
Definition: help.php:128
$pop_before_smtp
$pop_before_smtp
Definition: config_default.php:309
$config_location_base
$config_location_base
Definition: config_default.php:675
$version
global $version
Definition: config_default.php:26
$smtpline
if(! $stream) $smtpline
Definition: configtest.php:392
$imapPort
$imapPort
Definition: config_default.php:210
$stream
$stream
Definition: configtest.php:429
$included
$included
Definition: configtest.php:61
NULL
if(!defined('PAGE_NAME')) define('PAGE_NAME' NULL
Definition: validate.php:16
get_location
get_location()
Definition: strings.php:340
$test_location
$test_location
Definition: configtest.php:45
$IND
if(file_exists(SM_PATH . 'config/config.php')) $IND
Definition: configtest.php:41
$plugin_err
$plugin_err
Definition: configtest.php:319
$safe_mode
if((bool) ini_get('session.auto_start') &&ini_get('session.auto_start') !='off') $safe_mode
Definition: configtest.php:129
SM_PATH
const SM_PATH
Definition: configtest.php:31
boolean_hook_function
boolean_hook_function($name, $parm=NULL, $priority=0, $tie=false)
Definition: plugin.php:128
$addrbook_global_dsn
$addrbook_global_dsn
Definition: config_default.php:982