Fix problem where PBMS daemon is not loaded or the 'pbms' database doesn't exist.
This commit is contained in:

committed by
Marc Delisle

parent
f8653e5803
commit
a8e5b0f275
@@ -109,10 +109,11 @@ function checkBLOBStreamingPlugins()
|
|||||||
$PMA_Config->set('PHP_PBMS_EXISTS', FALSE);
|
$PMA_Config->set('PHP_PBMS_EXISTS', FALSE);
|
||||||
$PMA_Config->set('FILEINFO_EXISTS', FALSE);
|
$PMA_Config->set('FILEINFO_EXISTS', FALSE);
|
||||||
|
|
||||||
// Check to see if the BLOB Streaming PHP extension is loaded
|
// Create the 'pbms' database if it doesn't exist.
|
||||||
if (extension_loaded("PBMS")) {
|
// PBMS creates this database automaticly as soon as
|
||||||
$PMA_Config->set('PHP_PBMS_EXISTS', TRUE);
|
// a PBMS enabled table is accessed but we may need it earlier
|
||||||
}
|
// when a select is done on pbms.pbms_enabled.
|
||||||
|
PMA_DBI_query("create database IF NOT EXISTS pbms;" );
|
||||||
|
|
||||||
// check if PECL's fileinfo library exist
|
// check if PECL's fileinfo library exist
|
||||||
$finfo = NULL;
|
$finfo = NULL;
|
||||||
@@ -324,6 +325,9 @@ function PMA_BS_IsTablePBMSEnabled($db_name, $tbl_name, $tbl_type)
|
|||||||
// return if unable to load PMA configuration
|
// return if unable to load PMA configuration
|
||||||
if (empty($PMA_Config))
|
if (empty($PMA_Config))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!$PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST') )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// This information should be cached rather than selecting it each time.
|
// This information should be cached rather than selecting it each time.
|
||||||
//$query = "SELECT count(*) FROM information_schema.TABLES T, pbms.pbms_enabled E where T.table_schema = ". PMA_backquote($db_name) . " and T.table_name = ". PMA_backquote($tbl_name) . " and T.engine = E.name";
|
//$query = "SELECT count(*) FROM information_schema.TABLES T, pbms.pbms_enabled E where T.table_schema = ". PMA_backquote($db_name) . " and T.table_name = ". PMA_backquote($tbl_name) . " and T.engine = E.name";
|
||||||
|
@@ -80,17 +80,21 @@ if (empty($_REQUEST['engine'])
|
|||||||
. '</tr>' . "\n";
|
. '</tr>' . "\n";
|
||||||
$odd_row = !$odd_row;
|
$odd_row = !$odd_row;
|
||||||
}
|
}
|
||||||
// Special case for PBMS daemon which is not listed as an engine
|
|
||||||
echo '<tr class="'
|
$PMA_Config = $GLOBALS['PMA_Config'];
|
||||||
. ($odd_row ? 'odd' : 'even')
|
if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) {
|
||||||
. '">' . "\n"
|
// Special case for PBMS daemon which is not listed as an engine
|
||||||
. ' <td><a href="./server_engines.php'
|
echo '<tr class="'
|
||||||
. PMA_generate_common_url(array('engine' => "PBMS")) . '">' . "\n"
|
. ($odd_row ? 'odd' : 'even')
|
||||||
. ' ' . "PBMS\n"
|
. '">' . "\n"
|
||||||
. ' </a></td>' . "\n"
|
. ' <td><a href="./server_engines.php'
|
||||||
. ' <td>' . htmlspecialchars("PrimeBase BLOB streaming daemon") . '</td>' . "\n"
|
. PMA_generate_common_url(array('engine' => "PBMS")) . '">' . "\n"
|
||||||
. '</tr>' . "\n";
|
. ' ' . "PBMS\n"
|
||||||
|
. ' </a></td>' . "\n"
|
||||||
|
. ' <td>' . htmlspecialchars("PrimeBase MediaStream (PBMS) daemon") . '</td>' . "\n"
|
||||||
|
. '</tr>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
unset($odd_row, $engine, $details);
|
unset($odd_row, $engine, $details);
|
||||||
echo '</tbody>' . "\n"
|
echo '</tbody>' . "\n"
|
||||||
. '</table>' . "\n";
|
. '</table>' . "\n";
|
||||||
|
Reference in New Issue
Block a user