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: 2020-06-03 16:04 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tuanbk08vn at gmail dot com Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: 7.2.15 OS: Windows Server 2016 Standard
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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)

Pull Requests

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.
 [2019-03-29 09:39 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2020-06-03 16:04 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2020-06-03 16:04 UTC] cmb@php.net
This has been been fixed long ago:
<https://github.com/php/pecl-search_engine-solr/pull/15>.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 00:01:35 2025 UTC