|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-02-22 15:22 UTC] bupy765 at gmail dot com
Description: ------------ I have build PHP7 using following source: ttps://secure.php.net/downloads.php#v7.0.3 I got error associated with OpenSSL when used Composer. Initially I thought that it Composer bug and sent report to Composer team: https://github.com/composer/composer/issues/4940 Together with team of Composer came to the conclusion that it bug PHP7. Information about PHP7, OpenSSL and OS: OS X 10.9.5 --- PHP 7.0.3 (cli) (built: Feb 22 2016 19:34:44) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.4.0RC4, Copyright (c) 2002-2016, by Derick Rethans --- /Volumes/Home/username/.phpbrew/php/php-7.0.3/var/db/openssl.ini, openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 0.9.8zg 14 July 2015 OpenSSL Header Version => OpenSSL 1.0.1j 15 Oct 2014 Openssl default config => /System/Library/OpenSSL/openssl.cnf openssl.cafile => no value => no value openssl.capath => no value => no value OpenSSL support => enabled Test script: --------------- php -ddisplay_errors=1 -derror_reporting=-1 -r 'openssl_x509_parse(file_get_contents("https://raw.githubusercontent.com/composer/composer/master/res/cacert.pem"));' Expected result: ---------------- PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 9223372036854775912 bytes) in Command line code on line 1 PHP Stack trace: PHP 1. {main}() Command line code:0 PHP 2. openssl_x509_parse() Command line code:1 Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 9223372036854775912 bytes) in Command line code on line 1 Call Stack: 0.0001 349360 1. {main}() Command line code:0 1.8493 610256 2. openssl_x509_parse() Command line code:1 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 13:00:01 2025 UTC |
OpenSSL Library Version => OpenSSL 0.9.8zg 14 July 2015 OpenSSL Header Version => OpenSSL 1.0.1j 15 Oct 2014 You have multiple openssl versions installed in your system and using wrong openssl library. Link with 1.0.1j and see if it works. (e.g. Remove old openssl) [yohgaki@dev php-build]$ php -v PHP 7.0.3 (cli) (built: Feb 23 2016 03:31:55) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.4.0RC4, Copyright (c) 2002-2016, by Derick Rethans [yohgaki@dev php-build]$ php -ddisplay_errors=1 -derror_reporting=-1 -r 'var_dump(openssl_x509_parse(file_get_contents("https://raw.githubusercontent.com/composer/composer/master/res/cacert.pem")));' **SNIP worked well** [yohgaki@dev php-build]$ rpm -q openssl openssl-1.0.2f-1.fc23.x86_64 OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.2f-fips 28 Jan 2016 OpenSSL Header Version => OpenSSL 1.0.2f-fips 28 Jan 2016 Openssl default config => /etc/pki/tls/openssl.cnf