PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/mysqli/tests/bug51647.phpt ('Bug #51647 (Certificate file without private key (pk in another file) doesn't work)')

Script

1: <?php
2:     
include ("connect.inc");
3:
4:     if (!
is_object($link mysqli_init()))
5:         
printf("[001] Cannot create link\n");
6:
7:     if (!
my_mysqli_real_connect($link$host$user$passwd$db$port$socketMYSQLI_CLIENT_SSL MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT)) {
8:         
printf("[003] Connect failed, [%d] %s\n"mysqli_connect_errno(), mysqli_connect_error());
9:     }
10:
11:     if (!
$res $link->query('SHOW STATUS like "Ssl_cipher"')) {
12:         if (
1064 == $link->errno) {
13:             
/* ERROR 1064 (42000): You have an error in your SQL syntax;  = sql strict mode */
14:             
if ($res $link->query("SHOW STATUS")) {
15:                 while (
$row $res->fetch_assoc())
16:                     if (
$row['Variable_name'] == 'Ssl_cipher')
17:                         break;
18:             } else {
19:                 
printf("[005] [%d] %s\n"$link->errno$link->error);
20:             }
21:         } else {
22:             
printf("[004] [%d] %s\n"$link->errno$link->error);
23:         }
24:     } else {
25:         if (!
$row $res->fetch_assoc())
26:             
printf("[006] [%d] %s\n"$link->errno$link->error);
27:         if (!
strlen($row["Value"]))
28:             
printf("[007] Empty cipher. No encrytion!");
29:         
var_dump($row);
30:     }
31:
32:     
$link->close();
33:
34:     if (!
is_object($link mysqli_init()))
35:         
printf("[008] Cannot create link\n");
36:
37:     if (!
my_mysqli_real_connect($link$host$user$passwd$db$port$socketMYSQLI_CLIENT_SSL)) {
38:         
printf("[009] Connect failed, [%d] %s\n"mysqli_connect_errno(), mysqli_connect_error());
39:     }
40:
41:     if (!
$res $link->query('SHOW STATUS like "Ssl_cipher"')) {
42:         if (
1064 == $link->errno) {
43:             
/* ERROR 1064 (42000): You have an error in your SQL syntax;  = sql strict mode */
44:             
if ($res $link->query("SHOW STATUS")) {
45:                 while (
$row $res->fetch_assoc())
46:                     if (
$row['Variable_name'] == 'Ssl_cipher')
47:                         break;
48:             } else {
49:                 
printf("[010] [%d] %s\n"$link->errno$link->error);
50:             }
51:         } else {
52:             
printf("[011] [%d] %s\n"$link->errno$link->error);
53:         }
54:     } else {
55:         if (!
$row $res->fetch_assoc())
56:             
printf("[012] [%d] %s\n"$link->errno$link->error);
57:         if (!
strlen($row["Value"]))
58:             
printf("[013] Empty cipher. No encrytion!");
59:         
var_dump($row);
60:     }
61:
62:     
$link->close();
63:
64:     print 
"done!";
65:
?>
66:

Expected

array(2) {
  ["Variable_name"]=>
  string(10) "Ssl_cipher"
  ["Value"]=>
  string(%d) "%S"
}
array(2) {
  ["Variable_name"]=>
  string(10) "Ssl_cipher"
  ["Value"]=>
  string(%d) "%S"
}
done!

Output

Warning: mysqli_real_connect(): this stream does not support SSL/crypto in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): [2002]  (trying to connect via (null)) in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): (HY000/2002):  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
[003] Connect failed, [2002] 

Warning: mysqli::query(): invalid object or resource mysqli
 in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/bug51647.php on line 11
[004] [2002] 

Warning: mysqli_real_connect(): this stream does not support SSL/crypto in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): [2002]  (trying to connect via (null)) in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113

Warning: mysqli_real_connect(): (HY000/2002):  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
[009] Connect failed, [2002] 

Warning: mysqli::query(): invalid object or resource mysqli
 in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/bug51647.php on line 41
[011] [2002] 
done!

Diff

001+ Warning: mysqli_real_connect(): this stream does not support SSL/crypto in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
002+ 
003+ Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
004+ 
005+ Warning: mysqli_real_connect(): [2002]  (trying to connect via (null)) in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
006+ 
007+ Warning: mysqli_real_connect(): (HY000/2002):  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
008+ [003] Connect failed, [2002] 
009+ 
010+ Warning: mysqli::query(): invalid object or resource mysqli
011+  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/bug51647.php on line 11
012+ [004] [2002] 
013+ 
001- array(2) {
002-   ["Variable_name"]=>
003-   string(10) "Ssl_cipher"
004-   ["Value"]=>
005-   string(%d) "%S"
006- }
007- array(2) {
008-   ["Variable_name"]=>
009-   string(10) "Ssl_cipher"
010-   ["Value"]=>
011-   string(%d) "%S"
012- }
013- done!
014+ Warning: mysqli_real_connect(): this stream does not support SSL/crypto in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
015+ 
016+ Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
017+ 
018+ Warning: mysqli_real_connect(): [2002]  (trying to connect via (null)) in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
019+ 
020+ Warning: mysqli_real_connect(): (HY000/2002):  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/connect.inc on line 113
021+ [009] Connect failed, [2002] 
022+ 
023+ Warning: mysqli::query(): invalid object or resource mysqli
024+  in /var/php_gcov/PHP_HEAD/ext/mysqli/tests/bug51647.php on line 41
025+ [011] [2002] 
026+ done!

 

Generated at Tue, 26 Jul 2016 17:07:52 +0000 (2 days ago)

Copyright © 2005-2016 The PHP Group
All rights reserved.