PHP  
 PHP_5_5
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:     
$path_to_pems = !$IS_MYSQLND"ext/mysqli/tests/" "";
8:     if (!
$link->ssl_set("{$path_to_pems}client-key.pem""{$path_to_pems}client-cert.pem""{$path_to_pems}cacert.pem","",""))
9:         
printf("[002] [%d] %s\n"$link->errno$link->error);
10:
11:     if (!
my_mysqli_real_connect($link$host$user$passwd$db$port$socket)) {
12:         
printf("[003] Connect failed, [%d] %s\n"mysqli_connect_errno(), mysqli_connect_error());
13:     }
14:
15:     if (!
$res $link->query('SHOW STATUS like "Ssl_cipher"')) {
16:         if (
1064 == $link->errno) {
17:             
/* ERROR 1064 (42000): You have an error in your SQL syntax;  = sql strict mode */
18:             
if ($res $link->query("SHOW STATUS")) {
19:                 while (
$row $res->fetch_assoc())
20:                     if (
$row['Variable_name'] == 'Ssl_cipher')
21:                         break;
22:             } else {
23:                 
printf("[005] [%d] %s\n"$link->errno$link->error);
24:             }
25:         } else {
26:             
printf("[004] [%d] %s\n"$link->errno$link->error);
27:         }
28:     } else {
29:         if (!
$row $res->fetch_assoc())
30:             
printf("[006] [%d] %s\n"$link->errno$link->error);
31:     }
32:
33:     
var_dump($row);
34:
35:     print 
"done!";
36:
?>
37:

Expected

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_5_5/ext/mysqli/tests/connect.inc on line 114

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

Warning: mysqli_real_connect(): [2002]  (trying to connect via unix:///var/lib/mysql/mysql.sock) in /var/php_gcov/PHP_5_5/ext/mysqli/tests/connect.inc on line 114

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

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

Notice: Undefined variable: row in /var/php_gcov/PHP_5_5/ext/mysqli/tests/bug51647.php on line 33
NULL
done!

Diff

001+ Warning: mysqli_real_connect(): this stream does not support SSL/crypto in /var/php_gcov/PHP_5_5/ext/mysqli/tests/connect.inc on line 114
002+ 
003+ Warning: mysqli_real_connect(): Cannot connect to MySQL by using SSL in /var/php_gcov/PHP_5_5/ext/mysqli/tests/connect.inc on line 114
004+ 
005+ Warning: mysqli_real_connect(): [2002]  (trying to connect via unix:///var/lib/mysql/mysql.sock) in /var/php_gcov/PHP_5_5/ext/mysqli/tests/connect.inc on line 114
006+ 
007+ Warning: mysqli_real_connect(): (HY000/2002):  in /var/php_gcov/PHP_5_5/ext/mysqli/tests/connect.inc on line 114
008+ [003] Connect failed, [2002] 
009+ 
010+ Warning: mysqli::query(): invalid object or resource mysqli
011+  in /var/php_gcov/PHP_5_5/ext/mysqli/tests/bug51647.php on line 15
012+ [004] [2002] 
013+ 
014+ Notice: Undefined variable: row in /var/php_gcov/PHP_5_5/ext/mysqli/tests/bug51647.php on line 33
015+ NULL
001- array(2) {
002-   ["Variable_name"]=>
003-   string(10) "Ssl_cipher"
004-   ["Value"]=>
005-   string(%d) "%S"
006- }

 

Generated at Sun, 26 Oct 2014 06:24:57 +0000 (5 days ago)

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