If you are seeing this in your browser, PHP is not installed on your web server!!! *******************************************/ /** * We will perform some sanity checking here, since this file is normally loaded first when users * first setup PLA. */ define('LIBDIR','../lib/'); ini_set('display_errors',1); error_reporting(E_ALL); # General functions needed to proceed (pla_ldap_search(), pla_error(), get_object_attrs(), etc.) ob_start(); if (! file_exists(LIBDIR.'functions.php')) { ob_end_clean(); die("Fatal error: Required file 'functions.php' does not exist."); } if (! is_readable(LIBDIR.'functions.php')) { ob_end_clean(); die("Cannot read the file 'functions.php' its permissions are too strict."); } require LIBDIR.'functions.php'; $config_file = CONFDIR.'config.php'; ob_end_clean(); /* Helper functions. * Our required helper functions are defined in functions.php */ foreach ($pla_function_files as $file_name ) { if (! file_exists($file_name)) pla_error("Fatal error: Required file '$file_name' does not exist."); if (! is_readable($file_name)) pla_error( "Fatal error: Cannot read the file '$file_name', its permissions are too strict." ); ob_start(); require $file_name; ob_end_clean(); } # Configuration File check if (! file_exists($config_file)) { ?>
\$servers['host'] = \"ldap.example.com\";phpLDAPadmin cannot proceed util you correct this.", false ); return false; } // Check that 'base' is present on all serve entries foreach( $servers as $id => $server ) { if( isset( $server['host'] ) && isset( $server['name'] ) ) isset( $server['base'] ) or pla_error ( "Your configuration has an error. You omitted the 'base' directive on server number $id. Your server entry must have a 'base' directive even if it's empty ('')." ); } // Check each of the servers in the servers array foreach( $servers as $id => $server ) { if( isset( $server['host'] ) ) { // Make sure they specified an auth_type if( ! isset( $server['auth_type'] ) ) { pla_error( "Your configuration has an error. You omitted the 'auth_type' directive on server number $id 'auth_type' must be set, and it must be one of 'config', 'cookie', or 'session'.", false ); return false; } // Make sure they specified a correct auth_type if( ! in_array( $server['auth_type'], array( 'config', 'cookie', 'session' ) ) ) { global $lang; pla_error( sprintf( $lang['error_auth_type_config'], htmlspecialchars( $server['auth_type'] ) ) ); return false; } } } */ return true; } ?>