From:             beckman at purplecow dot com
Operating system: FreeBSD 5.3-RELEASE-p10
PHP version:      5.0.5
PHP Bug Type:     OpenSSL related
Bug description:  openssl 0.9.8a + module does not load any ciphers

Description:
------------
Using FreeBSD ports tree, I installed openssl 0.9.8a and php5-openssl,
which installed the openssl libraries and tools and the php5 openssl
extension openssl.so.

After confirming the HTTPS/SSL contexts (streams and transports) were
enabled, and OpenSSL support was enabled, I attempted to use
file_get_contents to open an HTTPS:// url.

This resulted in the following PHP errors:

[08-Nov-2005 14:28:10] PHP Warning:  file_get_contents(): failed to
create
an SSL context in /usr/local/lib/php/762dev/functions.inc on line 576
[08-Nov-2005 14:28:10] PHP Warning:  file_get_contents(): Failed to
enable
crypto in /usr/local/lib/php/762dev/functions.inc on line 576
[08-Nov-2005 14:28:10] PHP Warning:
file_get_contents(https://##.#########.com/?user=######&passwd=######&msisdn=###########):
failed to open stream: Operation
 now in progress in /usr/local/lib/php/762dev/functions.inc on line 576

Here's what I got as the error from openssl_error_string():

    error:140A90A1:SSL routines:func(169):reason(161)

And here's what I read to lead me to believe that the problem is with a
change in the way openssl initializes the ciphers:
   
http://lists.alioth.debian.org/pipermail/pkg-openssl-devel/2005-October/000219.html

I think that php5-openssl does not call the SSL_library_init() function
before starting use of the library.

I de-installed openssl.so and the openssl library, re-installed
openssl-0.9.7i, re-installed the openssl.so extension/module, and the
library now works great from within PHP.


Reproduce code:
---------------
echo file_get_contents("https://whatever.com/";);

Expected result:
----------------
The contents of whatever.com.

Actual result:
--------------
Errors.
[08-Nov-2005 14:28:10] PHP Warning:  file_get_contents(): failed to
create
an SSL context in /usr/local/lib/php/762dev/functions.inc on line 576
[08-Nov-2005 14:28:10] PHP Warning:  file_get_contents(): Failed to
enable
crypto in /usr/local/lib/php/762dev/functions.inc on line 576
[08-Nov-2005 14:28:10] PHP Warning:
file_get_contents(https://##.#########.com/?user=######&passwd=######&msisdn=###########):
failed to open stream: Operation
 now in progress in /usr/local/lib/php/762dev/functions.inc on line 576

Here's what I got as the error from openssl_error_string():

    error:140A90A1:SSL routines:func(169):reason(161)

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

Reply via email to