1

I would like to repeat the Ratchet Push example. Downloaded Composer. In the project folder via the console (CLI) I entered: php composer.phar require cboden/ratchet, after which the vendor folder and a pair of files from Composer appeared. I installed ZeroMQ and tried two installation options:

  1. Downloaded the necessary files from
    https://pecl.php.net/package/zmq/1.1.3/windows.
    - libzmq.dll unpacked in C:\xampp\php,
    - php_zmq.php in C:\xampp\php\ext.
    Added the C:\xampp\php\ext to system variable PATH,
    + restarted the computer,
    + restarted the web server.

  2. Downloaded the necessary files from
    https://pecl.php.net/package/zmq/1.1.3/windows.
    - libzmq.dll unpacked in C:\xampp\php\windowsXamppPhp,
    - php_zmq.php in C:\xampp\php\windowsXamppPhp\ext.
    Added the C:\xampp\php\windowsXamppPhp\ext to system variable PATH,
    + restarted the computer,
    + restarted the web server.

I also tried to throw the file libzmq.dll into the same folder as php_zmq.php.

The installation was guided by:
https://wiki.zeromq.org/bindings:php
+ https://superuser.com/questions/585291/installing-...

After all, started the xampp server, then in the console entered: php push-server.php, but the console throws an error :

> PHP Fatal error: Uncaught Error: Class 'React\ZMQ\Context' not found
> in C:\xampp\htdocs\test\push-server.php:9 Stack trace:
> #0 {main} thrown in C:\xampp\htdocs\test\push-server.php on line 9
> 
> Fatal error: Uncaught Error: Class 'React\ZMQ\Context' not found in
> C:\xampp\htdocs\test\push-server.php:9 Stack trace:
> #0 {main} thrown in C:\xampp\htdocs\test\push-server.php on line 9

P.S.: I believe that something is wrong with the installation of ZeroMQ since the file was not working.

  • ОС: windows 10
  • Server: XAMPP
  • PHP version: 7.4.2
user3666197
  • 1
  • 6
  • 50
  • 92
Space Around
  • 67
  • 10

0 Answers0