Hi pclove,
Please start new threads with the words "Hi" or "Hello". A short salutation is an act of politeness. Even if the internet is an virtual area, there is always a human being behind the screen. A polite beginning is the first positive impression you can leave here and helps to get polite answers too. Please keep that in mind if you start a new thread in any community board. Thank you.
PHP doesn't have the possibility to determine the MySQL Server version itself.
There are two ways to check for the correct server version but:
with the help of Shell without the need to login to the database- Code: Select all
function getMySQLVersion() {
$output = shell_exec('mysql -V');
preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version);
return $version[0];
}
print mysql_get_client_info();
After login with the php function
mysql_get_server_info()The first version is not bullet proof because not everyone has shell access
The second one needs a successful mysql connection
The only information PHP can get without asking the database is the information from the mysql connector which is the MySQL Client version.
This Client version can be very different from the Server version without losing any functionality.
There is nothing you can do except looking for new versions, fixes or workarounds of your webapplication.
best wishes,
Altrea