From:             php at tmcode dot com
Operating system: Linux
PHP version:      5.2.6
PHP Bug Type:     Streams related
Bug description:  Contradictory error message (failed to open stream: Success)

Description:
------------
Similar to bug #39850.  The last warning returned by file_get_contents,
fopen, etc  when a SSL error is encountered contains the word "Success".  


Reproduce code:
---------------
// verify_peer=true with https://google.com 
// to force a hostname mismatch error
$options = array(
    'ssl' => array(
        'verify_peer' => true,
        'allow_self_signed' => false                
        )
);

$context = stream_context_create($options);
$res=file_get_contents('https://google.com',null, $context);
$error = error_get_last();

echo $error['message'];


Expected result:
----------------
$error['message'] to include something other than the word "success"


Actual result:
--------------
file_get_contents(https://google.com): failed to open stream: Success



-- 
Edit bug report at http://bugs.php.net/?id=45130&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45130&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45130&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45130&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45130&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45130&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45130&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45130&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45130&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45130&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45130&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45130&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45130&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45130&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45130&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45130&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45130&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45130&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45130&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45130&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45130&r=mysqlcfg

Reply via email to