From: romanf at trash dot net
Operating system: Linux (OpenSuse 11)
PHP version: 5.2CVS-2008-12-04 (snap)
PHP Bug Type: HTTP related
Bug description: get_headers generates segmentation fault on HTTPS with
SSLVerifyClient required
Description:
------------
get_headers() generates segmentation fault on HTTPS-URLs with
"SSLVerifyClient required".
Reproduce code:
---------------
I put up two test-pages to reproduce the bug. One (client_none.php) has
"SSLVerifyClient none" set in .htaccess, the other (client_require.php) has
"SSLVerifyClient required" set.
Use the following to get the segmentation fault:
php -r
"print_r(get_headers('https://fish-serv.dyndns.org/php_test/client_none.php'));
print_r(get_headers('https://fish-serv.dyndns.org/php_test/client_require.php'));"
Expected result:
----------------
Second get_headers() should NOT produce a segmentation fault. It should
return a normal error-code instead.
Actual result:
--------------
[EMAIL PROTECTED]:~> php -r
"print_r(get_headers('https://fish-serv.dyndns.org/php_test/client_none.php'));
print_r(get_headers('https://fish-serv.dyndns.org/php_test/client_require.php'));"
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Thu, 04 Dec 2008 07:37:52 GMT
[2] => Server: Apache
[3] => X-Powered-By: PHP/5.2.8-dev
[4] => Content-Length: 136
[5] => Connection: close
[6] => Content-Type: text/html; charset=ISO-8859-1
)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14094410:SSL routines:func(148):reason(1040)
error:140940E5:SSL routines:func(148):reason(229) in Command line code on
line 1
Warning:
get_headers(https://fish-serv.dyndns.org/php_test/client_require.php):
failed to open stream: HTTP request failed! in Command line code on line
1
Segmentation fault
--
Edit bug report at http://bugs.php.net/?id=46748&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46748&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46748&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46748&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46748&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46748&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46748&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46748&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46748&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46748&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46748&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46748&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46748&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46748&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46748&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46748&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46748&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46748&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46748&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46748&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46748&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46748&r=mysqlcfg