diff --git a/ChangeLog b/ChangeLog index d96eeaecb..3b4179bab 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-11-10 Marc Delisle + * libraries/session.inc.php, Documentation.html: bug #1352479, warn + if PHP does not support session + 2005-11-10 Michal Čihař * scripts/create-release.sh: = is correct for comparsion in shell. diff --git a/Documentation.html b/Documentation.html index b25634761..b2ff00cc2 100755 --- a/Documentation.html +++ b/Documentation.html @@ -66,7 +66,7 @@
  • PHP
      -
    • You need PHP 4.1.0 or newer (*)
    • +
    • You need PHP 4.1.0 or newer, with session support (*)
    • If you want to display inline thumbnails of JPEGs with the original aspect ratio, you also need GD2 support in PHP
    • Starting with phpMyAdmin 2.6.1, MIME-based transformations diff --git a/libraries/session.inc.php b/libraries/session.inc.php index eee715334..caa179894 100644 --- a/libraries/session.inc.php +++ b/libraries/session.inc.php @@ -14,6 +14,27 @@ * @uses PHP_VERSION */ +// verify if PHP supports session, die if it does not + +if (!@function_exists('session_name')) { + + $cfg = array('DefaultLang' => 'en-iso-8859-1', + 'AllowAnywhereRecoding' => FALSE); + // Loads the language file + require_once('./libraries/select_lang.lib.php'); + // Displays the error message + // (do not use & for parameters sent by header) + header( 'Location: error.php' + . '?lang=' . urlencode( $available_languages[$lang][2] ) + . '&char=' . urlencode( $charset ) + . '&dir=' . urlencode( $text_dir ) + . '&type=' . urlencode( $strError ) + . '&error=' . urlencode( + sprintf($strCantLoad, 'session')) + ); + exit(); +} + // disable starting of sessions before all settings are done ini_set( 'session.auto_start', false );