I'm trying to install a multi-thread PHP system on one of my server. After a few readings, the simplest solution seems to use Pthreads with an amphp\thread
implementation.
http://www.mullie.eu/parallel-processing-multi-tasking-php/
So, If I'm right the steps were this :
- Install PHP 5.5+ with ZTS and Pthreads (http://eddmann.com/posts/compiling-php-5-5-with-zts-and-pthreads-support/)
- Then install amphp which require php-uv or libevent
When I'm trying to install php-uv
, I get an error on the step:
make -C libuv CFLAGS=-fPIC
Because the libuv directory is not on the git so I think I'm missing something...
Never the less, I also installed php libevent which can do the trick if I don't misunderstand the amphp
README.
- How can I test that this kind of library are well installed? I don't get any error, but who knows?**
- Also, I install
amphp
withcomposer
as it's described in the docs. But again, how can I test that the installation went well?
Then, if I assume everything went well, I can now install amphp/thead
.
Same question with the composer, how can I be sure that it's OK?
Then, I'm supposed to be ready so I create a test.php
file with the example code in the amphp/thread
and of course... I get an error which said that Amp\Thread\Dispatcher
class is not found. Of course I'm running it in CLI.
So to sum up, I only get error when installing php-uv
which doesn't seem to be absolutely required to run the class. So I'm pretty sure I'm missing something somewhere but don't know what...