php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72952 Solr PECL extension DLL not loaded with ZendServer 9 and PHP7
Submitted: 2016-08-27 12:38 UTC Modified: 2016-08-29 16:13 UTC
From: cklumpp at web dot de Assigned: ab (profile)
Status: Closed Package: solr (PECL)
PHP Version: 7.0Git-2016-08-27 (Git) OS: WIN10
Private report: No CVE-ID: None
 [2016-08-27 12:38 UTC] cklumpp at web dot de
Description:
------------
Hi,
I have the latest Zend Sever 9 running on WIN10 with PHP 7.0.6.
When I download the DLL to enable the SOLR extension (x86 non-thread-safe), the PHP log will simply output "the module cannot be found".
I´m very sure I have copied the DLL to the correct folder (C:\Programme (x86)\Zend\ZendServer\lib\phpext).

With Zend Server 8.5 and PHP version 5.6.25 it is no problem, the DLL is recognized and loaded as expected.

libxml extension is alreay built-in to Zend Server and PHP.

This is quite urgent, I have to upgrade to Zend Server 9 with PHP7 and the SOLR extension is a must-have.

Thanks in advance,
 Christian


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-27 13:49 UTC] omars@php.net
can you check https://bugs.php.net/bug.php?id=72001 ?

Making sure you have the correct TS and architecture.

After that I would suggest double checking the permissions, and path.
 [2016-08-27 13:53 UTC] omars@php.net
-Status: Open +Status: Feedback
 [2016-08-27 15:01 UTC] cklumpp at web dot de
-Status: Feedback +Status: Open
 [2016-08-27 15:01 UTC] cklumpp at web dot de
I tried all conbinations of architecture and TS, none of them work.
Don´t know what I should change regarding permissions - I simply copy the DLL into the phpext folder (which is configured in php.ini) and that´s usually it. It always worked up to now.
Which path do you mean? The system variable "PATH"? I never had to change this before with Zend Server 8.5 or previous versions. What do you recommend to add to the path?
 [2016-08-27 15:16 UTC] cklumpp at web dot de
When I copy the DLL from php_solr-2.4.0-7.0-nts-vc14-x64 into the phpext folder, and then restart PHP, the error log says:
php_solr.dll is not a valid Win32 application (%1 ist keine zulässige Win32-Anwendung.)

So I guess the permission and path settings are fine.
 [2016-08-27 15:26 UTC] kalle@php.net
@omars

This can be due to multiple reasons, but generally the "Module cannot be found" on Windows means that one of the dependencies of a certain DLL files that its linked against, cannot be found.

pecl/solr depends on the following PHP extensions:
 - JSON
 - LibXML

Both of which are built-in on Windows in our default distro, and I would assume Zend also does that.

Besides that, you will also need to have the following third-party libraries available on your system (You can usually dump these in the PHP folder (where php.exe, etc usually resides)):
 - libcurl (libcurl.dll)
 - openssl (ssleay32.dll)
 - zlib (zlib.dll)

And the following Windows libraries:
 - winmm.lib
 - wldap32.lib

If these are the issue, then it could be that newer versions of the C++ runtime is not available on the system, or the fact that Windows could be too old (but I doubt any of these may be the reason).

I also have vague memories that it may throw the same error in case that a symbol within a linked module was not found either.

I hope it was somewhat helpful to either side here
 [2016-08-27 15:53 UTC] cklumpp at web dot de
Thanks kalle!

The Zend Server distribution already comes with built-in modules in the PHP folder:
 - libcurl (libcurl.dll)
 - openssl (ssleay32.dll)
 - zlib (zlib.dll)
Also JSON and Libxml are built-in and loaded.

However I don´t know what to do with winmm.lib and wldap32.lib
 [2016-08-28 18:27 UTC] cklumpp at web dot de
I finally found out how tocheck the library dependencies by using deplister.
For php_solr.dll it says that libssh2 is not found.
However the official PECl site does not yet offer a DLL for PHP7 to download ( https://pecl.php.net/package/ssh2 ).

Is the libssh2 dependency still necessary? If yes, do I have to create a new request/bug on this topic? Unfortunately I don´t know how to create these DLLs on my own.

Here´s the deplister output:
C:\Program Files (x86)\Zend\ZendServer\bin>deplister php_solr.dll
php7.dll,OK
WS2_32.dll,OK
libssh2.dll,NOTFOUND
LIBEAY32.dll,OK
SSLEAY32.dll,OK
WLDAP32.dll,OK
Normaliz.dll,OK
KERNEL32.dll,OK
VCRUNTIME140.dll,OK
api-ms-win-crt-heap-l1-1-0.dll,NOTFOUND
api-ms-win-crt-convert-l1-1-0.dll,NOTFOUND
api-ms-win-crt-stdio-l1-1-0.dll,NOTFOUND
api-ms-win-crt-utility-l1-1-0.dll,NOTFOUND
api-ms-win-crt-string-l1-1-0.dll,NOTFOUND
api-ms-win-crt-runtime-l1-1-0.dll,NOTFOUND
api-ms-win-crt-time-l1-1-0.dll,NOTFOUND
api-ms-win-crt-filesystem-l1-1-0.dll,NOTFOUND
api-ms-win-crt-environment-l1-1-0.dll,NOTFOUND
api-ms-win-crt-math-l1-1-0.dll,NOTFOUND
 [2016-08-28 20:54 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-08-28 20:54 UTC] ab@php.net
@cklumpp, libssh2.dll is a part of a PHP distribution you can fetch from windows.php.net. The PECL extensions are built with the regard to the compatibility. So no DLLs are supplied twice, if they're already in the core.

Apparently Zend Server might use own builds, I'm not sure about that. Or there can be another reason. Anyway, if libssh2.dll is the only what is missing, you can fetch it either from a PHP release tarball, or from http://windows.php.net/downloads/php-sdk/deps/ . Given vc14 builds are used.

Also don't confuse the libssh2.dll with the ssh2 extension, as i guess you do in bug #72956. Those are different things.

Thanks.
 [2016-08-28 23:09 UTC] cklumpp at web dot de
-Status: Feedback +Status: Closed
 [2016-08-28 23:09 UTC] cklumpp at web dot de
OMG - it finally works :-D

I downloaded the libssh2.dll from https://pecl.php.net/package/ssh2/0.12/windows and copied it to my ZendServer/bin and Apache/bin folders.
Actually ilibssh2.dll belongs to PHP5, but for some reason it works.
This solved the missing dependency to libssh2 for the Solr extension.

In order to solve all other dependencies (api-ms-win-crt-*) I had to re-install the Visual C Redistributable (vc_redist_x86.exe).

You are right, extension ssh2 (php_ssh2.dll) is not necessary.
 [2016-08-29 16:13 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2016-08-29 16:13 UTC] ab@php.net
@cklumpp it is not quite correct. According to http://www.zend.com/de/products/server/system-requirements you need a vc14 build. PHP 5 builds are made with vc11. You should get libssh2.dll compiled with the correct runtime.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC