~ubuntu-branches/debian/sid/phpldapadmin/sid

« back to all changes in this revision

Viewing changes to index.php

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2004-06-05 20:23:23 UTC
  • Revision ID: james.westby@ubuntu.com-20040605202323-ib7di8x022w61b5l
Tags: 0.9.4-6
* Fixed some mistakes in debconf template. (Closes: #252473)
* Added italian and french debconf template translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Header: /cvsroot/phpldapadmin/phpldapadmin/index.php,v 1.22 2004/03/19 20:13:08 i18phpldapadmin Exp $
 
2
// $Header: /cvsroot/phpldapadmin/phpldapadmin/index.php,v 1.24 2004/05/10 12:29:06 uugdave Exp $
3
3
 
4
4
 
5
5
/*******************************************
68
68
 */
69
69
function check_config()
70
70
{
 
71
    global $lang;
71
72
        /* Make sure their PHP version is current enough */
72
73
        if( strcmp( phpversion(), REQUIRED_PHP_VERSION ) < 0 ) {
73
74
                pla_error( "phpLDAPadmin requires PHP version 4.1.0 or greater. You are using " . phpversion() );
81
82
                return false;
82
83
        }
83
84
 
84
 
        /* Make sure they have all the functions we will need */
85
 
        $required_functions = array( 'htmlspecialchars' );
86
 
        foreach( $required_functions as $function ) {
87
 
                if( ! function_exists( $function ) ) {
88
 
                        pla_error( "Your install of PHP appears to be missing the function '<b>$function()</b>' " .
89
 
                                "phpLDAPadmin requires this function to work properly." );
90
 
                        return false;
91
 
                }
92
 
        }
93
 
 
94
85
        /* Make sure the config file is readable */
95
86
        //if( ! is_readable( 'config.php' ) )
96
87
        if( ! is_readable( realpath( 'config.php' ) ) ) {
98
89
                return false;
99
90
        }
100
91
 
 
92
    if( ! is_writable( realpath( ini_get( 'session.save_path' ) ) ) ) {
 
93
        pla_error( "Your PHP session configuration is incorrect. Please check the value of session.save_path 
 
94
                    in your php.ini to ensure that the directory specified there exists and is writable", false );
 
95
        return false;
 
96
    }
 
97
 
101
98
        /* check for syntax errors in config.php */
102
99
        // capture the result of including the file with output buffering
103
100
        ob_start();