Open remicollet opened 6 years ago
zend_mm_heap corrupted still happens with the new release of PHP 7.3
Hello everyone,
Please check the commit ( https://github.com/alexat/php-zmq/commit/af02bde61c2a5af1ae64cac09ffe2b25237aa58e ) at my copy, I tried to do all the fixups required, and tests pass. Also fixes one long standing nasty bug with string initialization on recv() which could cause all sorts of issues.
@alexat thanks for the update, i dont really know how to build them for windows and linux so i hope project maintainer or @remicollet test them out xD
Hi,
I have tested this version, compiling is OK, tests too, however I faced a curious bug that causes segfault on FPM processes. A strace shows a "getpid" function calls bombing. I'm not able to reproduce it in a sample code, and not able to isolate it. Too much problems, I'm going to migrate to IPC messages queue instead of ZMQ.
@gregorg Um, is perchance your PHP 7.3 build ZTS (have thread safety enabled)?
@alexat segfault occurs on non-ZTS build (see output in first comment)
@alexat I confirm, compiled without ZTS enabled.
@alexat in fact, using your fork, test suite passes.
I have built myself a certain project development environment with PHP 7.3 / php-zmq patched for it, and started using it in one instead of PHP 7.0. For now, I don't have the aforementioned issue reported by @gregorg, on a ZMQ based centrale with 180+ nodes persistently connected and exchanging data via REQ/REP and PUB/SUB over TCP, so it at least works fine for me. Will continue testing it of course.
@gregorg So, for now I cannot exactly reproduce it. If you are able to somehow come with a failure reproduction script set, please mail me or create the issue @ my fork, I'll investigate.
Hi there. I`m using ZQM on Windows and now with PHP 7.3 i receive an error.
There is any fix for that?
@oriceon You probably need to rebuild the php-zmq library for PHP 7.3 manually.
You can try (see the attachment) x64 NTS (no thread safety) or ZTS (thread safety) binaries I have just built against latest ZeroMQ 4.0.4 library release (you will need libzmq-v120-mt-4_0_4.dll to run these moudles) from the official ZeroMQ site.
But please keep in mind using such third party binaries is at best insecure and of course nothing is guaranteed to work correctly. I tested DLL with vanilla PHP 7.3.0 x64 release and it loads fine, no other tests were performed.
@alexat thank you for your time. It`s loaded fine. Hope your pull request will be merged soon :)
@oriceon Given this repo is dead for 2+ years already, the chances are close to none. So I'll probably resort to maintainining it in my own tree with time, have some active/running/production projects that depend on it heavily and are not easily ported.
In case anyone else makes it here and is having issues with an "Unable to load dynamic library 'php_zmq.dll'" message - don't rename libzmq-v120-mt-4_0_4.dll to libzmq.dll. Leave it named as-is.
@alexat Thank you very much for the 7.3 updates. I was able to compile it myself using your repository.
Just also wanted to thank @alexat - cheers mate.
Would be great to release new 2.x beta version to pecl
@andypost as @alexat said in an earlier comment - unlikely. It appears this repo is dead.
@alexat - would you be willing to take over ownership of this extension? I'm sure @mkoppanen would be willing to give up control since they don't appear to be doing anything with it anymore.
In the attached file, you'll find a compiled version of the library, working on the following environment:
PHP Version: 7.3.2 Compiler: MSVC15 (Visual C++ 2017) Architecture: x86 Thread safety (TS): enabled
How to install it?
PATH
environment variable.ext
directory.@kvitozev can you publish also a version for php 7.3.2 nts x64 ?!
And maybe steps to compile myself for later versions.
Thanks.
Hi,
@alexat uploaded the following file in the same thread:
php-7.3.0-zmq-1.1.4-4.0.4-x64-vc15.zip
This doesn't work for you?
I need to install it on php 7.3.9 on windows. Has anyone succeeded?
Thanks.
@sergiorighi, what architecture - 32/64bit? If it's 64bit, you can try to use the .dll I attached few months ago.
@alexat we are looking for a new maintainer - see https://lists.zeromq.org/pipermail/zeromq-dev/2019-August/033109.html - are you interested?
@kvitozev, is 64bit zts. I already tried that .dll, but it doesn't work at all. I tried with all possible versions and combinations.
@bluca I am actually interested and I have projects on php-zmq running, but alas, my current job eats almost all of my lifetime, so I surely won't become a decent maintainer, and project will still look lost. So this is a 'no', although I'll surely do some work on PHP 7.4 compatibility if needed when it's finally out.
PHP 7.4 also brings in a new C-wrapper API it seems, I wonder if it will be possible to wrap PHP ZMQ in it eventually. So this is an area to investigate, which I'll as well will touch eventually and share if it does some good.
@alexat we'd be happy to have someone that knows php and can review pull requests - we are not looking for a full time developer, just for someone qualified enough to press the "merge" button with some confidence :-)
PHP Version: 7.4.4 0MQ Version: 4.3.2 Compiler: MSVC15 (Visual C++ 2017) Architecture: x64
Both ZTS & NTS
@kinosang can you publish nts also?
@oriceon Here it is.
Thanks
@kinosang
Thanks!
Thanks!
I'm having problems with php 7.4.7, apache exits with error Parent: child process exited with error code 3221225725. Without zmq it doesn't happen. Someone with the same problem?
@sergiorighi I do not encounter that problem.
I tried php-7.4.4-zmq-1.1.4-4.3.2-x64-vc15-zts-nts.zip:
While
$this->context = new ZMQContext();
$this->socket = new ZMQSocket($this->context, ZMQ::SOCKET_DEALER);
works when executing it with php.exe.
But the line new ZMQSocket() crashes in Apache 2.4
Any idea what could be the reason?
Are you perchance using non-ZTS PHP&module with ZTS-requiring MPM like worker or event?
I use php_zmq_zts.dll & libzmq-v141-mt-4_3_2.dll, zmq is listed in phpinfo() and php.exe -i
I can create the ZMQContext, but when the script is called in the browser, the script just terminates when a ZMQSocket is created. When I call the script with php.exe, it works.
Have someone tested with php 8?
The latest trunk here has the isolation parameter fix, compiles and passes all the small test subset under released PHP 8.0. Have not done any application testing yet personally though.
As PHP 7.2 days are gone, it makes sense to rename the issue to 8.0
Sorry about this - can i ask you why the're couple of merged MR with fixes about PHP 7.3 and PHP 8.0 compatibility, but the latest version of libzmq-php published on PECL dates back to 2016? Could someone publish a new compiled version on PECL or we've to manually compile everyone from the source code?
Sorry about this - can i ask you why the're couple of merged MR with fixes about PHP 7.3 and PHP 8.0 compatibility, but the latest version of libzmq-php published on PECL dates back to 2016? Could someone publish a new compiled version on PECL or we've to manually compile everyone from the source code?
I was able to compile it myself against 7.3, but I'm having issues against 8.0. If anyone has a x64 nts version they could share, that would be awesome.
I compiled zmq for PHP 8.0.2 x64 NTS. File(s) attached to this comment if they are useful to anyone else. Use at your own risk!
I'm having problems with php 7.4.7, apache exits with error Parent: child process exited with error code 3221225725. Without zmq it doesn't happen. Someone with the same problem?
Same Problem here, PHP 7.4.13, Apache 2.4 on a Windows machine. Apache starts without any error but as soon as php call a zmq function, Apache crash with code 3221225725
I'm not exactly versed in Windows builds, but please check if the extension, PHP and Apache are built using the same VC version & for the same VC runtime version.
I'm not exactly versed in Windows builds, but please check if the extension, PHP and Apache are built using the same VC version & for the same VC runtime version.
@alexat , thanks for the response. I checked and extension, PHP and Apache are all built with VC15 x64. That not seem to be the problem
I was not able to run zmq in php 7.4 either when php was run as an apache module:
LoadModule php7_module C:/PHP70_TS/php7apache2_4.dll (TS)
It worked in my case with fcgid, though:
LoadModule fcgid_module modules/mod_fcgid.so (NTS)
Using zmq in php.exe also worked.
@wradstok https://github.com/zeromq/php-zmq/issues/193#issuecomment-779032545 is working Win10 php 8.0.10 without apache
@kinosang https://github.com/zeromq/php-zmq/issues/193#issuecomment-605456811 is working Win 10 php 7.4.9 under Apache2 under WAMP (as CGI and as Apache module)
For those who may come here from struggling with WAMP:
Don't have a second way to subistitute zmq (only for this push purpose)?
Somebody already tested in a online host?
Build can be fix with pr #190 but is not enough as we encounter segfault during test suite