Hi,
i have written a fail over for loading the desired extension,
should i check in this now, or should i wait for 2.7.1 ?
if selected extension it trys the other extension, and prints an error
message on main.php, but works, elsewise it redirects to error.php
(also minor changes in main.php and dbi/*)
in database_interface.lib.php:
/**
* Loads the mysql extensions if it is not loaded yet
*
* @param string $extension mysql extension to load
*/
function PMA_DBI_checkAndLoadMysqlExtension( $extension = 'mysql' ) {
if ( ! function_exists( $extension . '_connect' ) ) {
PMA_dl( $extension );
// check whether mysql is available
if ( ! function_exists( $extension . '_connect' ) ) {
return false;
}
}
return true;
}
/**
* check for requested extension
*/
if ( ! PMA_DBI_checkAndLoadMysqlExtension(
$GLOBALS['cfg']['Server']['extension'] ) ) {
// if it fails try alternative extension ...
// and display an error ...
// TODO 2.7.1: add different messages for alternativ extension
// and complete fail (no alternativ extension too)
$GLOBALS['errors'][] = sprintf($GLOBALS['strCantLoad'],
$GLOBALS['cfg']['Server']['extension']) . '<br />' . "\n"
.'<a href="./Documentation.html#faqmysql"
target="documentation">' . $GLOBALS['strDocu'] . '</a>' . "\n";
if ( $GLOBALS['cfg']['Server']['extension'] === 'mysql' ) {
$alternativ_extension = 'mysqli';
} else {
$alternativ_extension = 'mysql';
}
if ( ! PMA_DBI_checkAndLoadMysqlExtension( $alternativ_extension ) ) {
// if alternativ fails too ...
header( 'Location: error.php'
. '?lang=' . urlencode( $available_languages[$lang][2] )
. '&char=' . urlencode( $charset )
. '&dir=' . urlencode( $text_dir )
. '&type=' . urlencode( $strError )
. '&error=' . urlencode(
sprintf( $GLOBALS['strCantLoad'],
$GLOBALS['cfg']['Server']['extension'] )
.' - [a@./Documentation.html#faqmysql@documentation]'
.$GLOBALS['strDocu'] . '[/a]' )
. '&' . SID
);
exit();
}
$GLOBALS['cfg']['Server']['extension'] = $alternativ_extension;
}
--
Sebastian Mendel
www.sebastianmendel.dewww.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet
Hi all
we still have QueryFrame config options even when there is no frame for
it right now, this should be IMHO fixed before 2.7.0 :-).
We already talked once about this, but there was no conclusion. I hope I
remember possibilities which we came with:
1. Allways display SQL icon in left frame and make it allways open SQL
window if possible (javascript enabled). Add EditInWindow for edit link
behaviour.
2. QueryWindow = true/false/left for query window/query tab/query window
only from left frame.
What to do with this?
--
Michal Čihař | http://cihar.com
Hi,
what is the reason for setting this default values to false?
$cfg['ShowMysqlInfo'] = FALSE; // whether to display the "MySQL
runtime
$cfg['ShowMysqlVars'] = FALSE; // information", "MySQL system
variables", "PHP
$cfg['ShowPhpInfo'] = FALSE; // information" and "change
password" links for
$cfg['ShowChgPassword'] = FALSE; // simple users or not
--
Sebastian Mendel
www.sebastianmendel.dewww.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet
"( 2005-11-11 06:27:36 - Project CVS Service ) As of 2005-11-11
developer CVS service is presently offline for unplanned maintenance,
estimated time of service restoration to be determined."