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