Test Failure Report for ext/mysql/tests/mysql_pconnect.phpt ('mysql_pconnect()')
Script
1:
<?php 2: include "connect.inc"; 3: 4: $tmp = NULL; 5: $link = NULL; 6: 7: // mysql_pconnect ( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]] ) 8: if (NULL !== ($tmp = @mysql_pconnect($link, $link, $link, $link, $link, $link))) 9: printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 10: 11: $myhost = (is_null($socket)) ? ((is_null($port)) ? $host : $host . ':' . $port) : $host . ':' . $socket; 12: if (!$link = mysql_pconnect($myhost, $user, $passwd, true)) 13: printf("[002] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", 14: $host, $myhost, $user, $db, $port, $socket); 15: 16: mysql_close($link); 17: 18: if ($link = mysql_pconnect($myhost, $user . 'unknown_really', $passwd . 'non_empty', true)) 19: printf("[003] Can connect to the server using host=%s/%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", 20: $host, $myhost, $user . 'unknown_really', $db, $port, $socket); 21: 22: if (false !== $link) 23: printf("[004] Expecting boolean/false, got %s/%s\n", gettype($link), $link); 24: 25: // Run the following tests without an anoynmous MySQL user and use a password for the test user! 26: 27: 28: if (!ini_get('sql.safe_mode')) { 29: 30: if ($socket) { 31: ini_set('mysql.default_socket', $socket); 32: if (!is_resource($link = mysql_pconnect($host, $user, $passwd, true))) { 33: printf("[005] Usage of mysql.default_socket failed\n") ; 34: } else { 35: mysql_close($link); 36: } 37: } else { 38: ini_set('mysql.default_socket', null); 39: } 40: 41: ini_set('mysql.default_port', $port); 42: if (!is_resource($link = mysql_pconnect($host, $user, $passwd, true))) { 43: printf("[006] Usage of mysql.default_port failed\n") ; 44: } else { 45: mysql_close($link); 46: } 47: 48: ini_set('mysql.default_password', $passwd); 49: if (!is_resource($link = mysql_pconnect($myhost, $user))) { 50: printf("[007] Usage of mysql.default_password failed\n") ; 51: } else { 52: mysql_close($link); 53: } 54: 55: ini_set('mysql.default_user', $user); 56: if (!is_resource($link = mysql_pconnect($myhost))) { 57: printf("[008] Usage of mysql.default_user failed\n"); 58: } else { 59: mysql_close($link); 60: } 61: 62: ini_set('mysql.default_host', $myhost); 63: if (!is_resource($link = mysql_pconnect())) { 64: printf("[009] Usage of mysql.default_host failed\n") ; 65: } else { 66: mysql_close($link); 67: } 68: } 69: 70: print "done!"; 71: ?> 72:
Expected
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
Warning: mysql_pconnect(): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
done!
Output
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 12
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 18
Warning: mysql_pconnect(): Access denied for user 'phpqaunknown_rea'@'localhost' (using password: YES) in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 18
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 32
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 42
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 49
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 56
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 63
done!
Diff
014+
015+ Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/php_gcov/PHP_5_5/ext/mysql/tests/mysql_pconnect.php on line 63
Generated at Thu, 23 May 2013 18:18:24 +0000 (2 hours ago)
|