-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.3 compatibility #193
Comments
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. |
@gregorg |
@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 |
@oriceon 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. |
@oriceon Given this repo is dead for 2+ years already, the chances are close to none. |
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 How to install it?
|
@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:
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. |
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 But the line 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, I can create the ZMQContext, but when the script is called in the browser, the script just |
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. |
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? |
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! |
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. |
@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 #193 (comment) is working Win10 php 8.0.10 without apache @kinosang #193 (comment) is working Win 10 php 7.4.9 under Apache2 under WAMP (as CGI and as Apache module) Thanks, both!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? |
@Lukaum dont know to whom this question was addressed, but if to me - I went onto Workerman + websockets to implement push notifications broker |
@nop1984 Great answer! I read every topic about change or similar lib for the zmq in ratchet, for this push purpose. But don't had a clear answer (until at this moment). Tried the Swoole php (in virtual machine with centos8), but its hard to implement and use (principally in windows so). Think this wokerman its a best solution. Gonna use! |
@Lukaum Swoole must be the fastest for PHP, but I don't need great speed much + wish to avoid installing extra php-ext because this for public drupal module. |
@nop1984 In my case, i just need to use websocket for a "real time" notifications, and only send this data for employees (in admin panel). For ratchet i found a solution. It works well when data comes from client-side, but i have a webhook comes from a payment gateway to my server, so thats why i need the push (update some row in db and transmit for some websocket connections, thats is the problem without the zmq). |
@Lukaum seems almost same I do: realtime push notification for client and support crew, via inpage js (toasts) and via browser Notification API with "webhooks" to update message status on backend (if it was delivered, if was interacted by user). With redis based middleware storage for better speed (not to call "webhooks" and other things per event but per timer). But without ZMQ, just workerman + redis on server and js ServiceWorker & page script on client. |
Just to share my experience, I was unable to get php-7.4.4-zmq-1.1.4-4.3.2-x64-vc15-zts-nts.zip from the following link to work. Tried to rename or not rename those dll files, or put libzmq.dll into apache/bin folder, always get:
I am running XAMP with PHP 7.4.23 X64 on Windows 11. On the same machine, XAMPP with PHP 7.2.34 works fine with PHP-ZMQ, |
Guys, can anyone share a php_zmq to PHP8.2 or 8.1 NTS?? Please!! |
Just Did it guys, feel free to test |
It also builds and passing tests on PHP 8.3 |
Paulo, do you have a TS version? Obrigado. |
the TS version you can find here: |
I made a new ZIP with the instructions and the correct files to everyone! Now its everting working ZMQ-4.3.4_x64_PHP8.2.10-NTS.zip :D |
Build can be fix with pr #190 but is not enough as we encounter segfault during test suite
The text was updated successfully, but these errors were encountered: