Output buffering is not available in php 3 (bug #824956).

This commit is contained in:
Michal Čihař
2003-10-16 17:25:27 +00:00
parent d6f4f5b8d4
commit 595d59629c
2 changed files with 23 additions and 14 deletions

View File

@@ -15,6 +15,8 @@ $Source$
* libraries/common.lib.php3: Add some more fixes for wrongly typed
$cfg['PmaAbsoluteUri'].
* Documentation: Changed my email and credits.
* libraries/defines_php.lib.php3: Output buffering is not available in
php 3 (bug #824956).
2003-10-15 Marc Delisle <lem9@users.sourceforge.net>
* lang/russian-windows-1251: wrong charset (bug 823939)

View File

@@ -67,20 +67,24 @@ function PMA_dl($module) {
if (((PMA_PHP_INT_VERSION >= 40000 && !@ini_get('safe_mode') && @ini_get('enable_dl'))
|| (PMA_PHP_INT_VERSION < 40000 && PMA_PHP_INT_VERSION > 30009 && !@get_cfg_var('safe_mode')))
&& @function_exists('dl')) {
ob_start();
phpinfo(INFO_GENERAL); /* Only general info */
$a = strip_tags(ob_get_contents());
ob_end_clean();
/* Get GD version string from phpinfo output */
if (ereg('Thread Safety[[:space:]]*enabled', $a)) {
if (ereg('Server API[[:space:]]*\(CGI\|CLI\)', $a)) {
$GLOBALS['PMA_dl_allowed'] = TRUE;
} else {
$GLOBALS['PMA_dl_allowed'] = FALSE;
}
} else {
if (PMA_PHP_INT_VERSION < 40000) {
$GLOBALS['PMA_dl_allowed'] = TRUE;
} else {
ob_start();
phpinfo(INFO_GENERAL); /* Only general info */
$a = strip_tags(ob_get_contents());
ob_end_clean();
/* Get GD version string from phpinfo output */
if (ereg('Thread Safety[[:space:]]*enabled', $a)) {
if (ereg('Server API[[:space:]]*\(CGI\|CLI\)', $a)) {
$GLOBALS['PMA_dl_allowed'] = TRUE;
} else {
$GLOBALS['PMA_dl_allowed'] = FALSE;
}
} else {
$GLOBALS['PMA_dl_allowed'] = TRUE;
}
}
} else {
$GLOBALS['PMA_dl_allowed'] = FALSE;
@@ -119,7 +123,7 @@ if (!defined('PMA_IS_GD2')) {
} else {
define('PMA_IS_GD2', 0);
}
} else {
} elseif (PMA_PHP_INT_VERSION >= 40000) {
/* We must do hard way... */
ob_start();
phpinfo(INFO_MODULES); /* Only modules */
@@ -135,6 +139,9 @@ if (!defined('PMA_IS_GD2')) {
} else {
define('PMA_IS_GD2', 0);
}
} else {
// This is PHP 3 version, it probably doesn't have GD2
define('PMA_IS_GD2', 0);
}
}
}