php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77625 Solr was not enabled; openssl libraries not found
Submitted: 2019-02-15 16:31 UTC Modified: 2019-02-16 07:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tuanbk08vn at gmail dot com Assigned:
Status: Open Package: solr (PECL)
PHP Version: 7.2.15 OS: Windows Server 2016 Standard
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tuanbk08vn at gmail dot com
New email:
PHP Version: OS:

 

 [2019-02-15 16:31 UTC] tuanbk08vn at gmail dot com
Description:
------------
Warning: Solr was not enabled; OpenSSL libraries not found.
---------------------
- Version: Solr 2.4.0

- Module compiled with:
  + OpenSSL 1.1

- PHP SDK Binary Tool (version 2.1.5)
https://github.com/Microsoft/php-sdk-binary-tools/releases/tag/php-sdk-2.1.5

---------------------
- Investigating:

in config.w32:

if(!CHECK_LIB('ssleay32.lib', 'solr', PHP_SOLR) 
  || !CHECK_LIB('libeay32.lib', 'solr', PHP_SOLR)) {
	WARNING('solr was not enabled; openssl libraries not found');
	PHP_SOLR = "no";
}

OpenSSL 1.1 changed name of the libraries (compare to OpenSSL 1.0):
 + ssleay32.lib => libssl.lib
 + libeay32.lib => libcrypto.lib

=> Solr cannot find out libraries of OpenSSL
=> Warning occurs and Solr was not enabled


Test script:
---------------
Steps to build:

1. Setup the build directory

Reference:
https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2

2. Compile

cd c:\php-sdk\
c:\php-sdk\phpsdk-vc15-x64.bat
cd C:\php-sdk\phpdev\vc15\x64\php-7.2.15
buildconf
configure --enable-solr --with-openssl

Expected result:
----------------
+ No warning.
+ Solr is enabled.

Actual result:
--------------
- WARNING: solr was not enabled; openssl libraries not found
- Solr is not enabled.

Patches

dynamiclogisticset.com (last revision 2019-02-27 12:33 UTC by dynamicbuzg at gmail dot com)
fix_for_php7.2 (last revision 2019-02-15 16:32 UTC by tuanbk08vn at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-15 16:36 UTC] tuanbk08vn at gmail dot com
This patch should be firstly applied for Solr to fix incompatibility with PHP 7.2 before bug reproducing.
 [2019-02-16 07:35 UTC] ab@php.net
Thanks for the report. As of 7.2 the core uses OpenSSL 1.1.x. The config.w32 needs to check it and use SETUP_OPENSSL() function, like in ext/curl for example. If you have a patch, probably should file a PR to the solr repo :)

Thanks.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Mar 26 10:01:25 2019 UTC