Lines Matching refs:version
18 $version = $db->getAttribute(PDO::ATTR_SERVER_VERSION);
19 if ('' == $version)
20 printf("[001] Server version must not be empty\n");
22 // Ideally the server version would be an integer - as documented but BC break!
23 // If its a version string it should be of the format \d+\.\d+\.\d+.*
25 if (is_string($version)) {
27 if (!preg_match('/(\d+)\.(\d+)\.(\d+)(.*)/', $version, $matches))
28 printf("[002] Client version string seems wrong, got '%s'\n", $version);
36 printf("[003] Strange major version: '%s'. Should be more than 3\n", $matches[1]);
38 printf("[004] Minor version should be at least 0, got '%s'\n", $matches[2]);
40 printf("[005] Sub version should be at least 0, got '%s'\n", $matches[2]);
42 } else if (is_int($version)) {
44 $major = floor($version / 10000);
45 $minor = floor(($version - ($main * 10000)) / 100);
46 $sub = $version - ($main * 10000) - ($minor * 100);
48 printf("[006] Strange major version: '%s'. Should be more than 3\n", $major);
50 printf("[007] Minor version should be at least 0, got '%s'\n", $minor);
52 printf("[008] Sub version should be at least 0, got '%s'\n", $sub);
57 printf("[009] Wonderful, I can change the client version!\n");
60 if ($new_version !== $version)
61 printf("[010] Did we change it from '%s' to '%s'?\n", $version, $new_version);