search

Home  >  Q&A  >  body text

php - swoole_client does not respond when accessed by apache

swoole_client does not respond when accessed by apache
Follow the documentation
Synchronously blocking the client

$client = new swoole_client(SWOOLE_SOCK_TCP);
if (!$client->connect('127.0.0.1', 9501, -1))
{
    exit("connect failed. Error: {$client->errCode}\n");
}
$client->send("hello world\n");
echo $client->recv();
$client->close();

Only the synchronous client can be used in the php-fpm/apache environment
Only the prefork multi-process mode is supported in the apache environment, and prework multi-threading is not supported

I am using the synchronous blocking client, but there is no response when accessing

滿天的星座滿天的星座2800 days ago607

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 13:09:06

    Does not support Apache multi-threading mode.

    reply
    0
  • Cancelreply