Pusher无法在DigitalOcean.com上运行

时间:2017-03-21 13:13:10

标签: php laravel curl digital-ocean pusher

我想将Pusher整合到Laravel 5.4中。我安装了" pusher / pusher-php-server:2.6"通过Composer,这是我用来发送消息的代码:

$options = ['cluster' => 'eu', 'encrypted' => true];
$pusher = new Pusher(env('PUSHER_KEY'), env('PUSHER_SECRET'), env('PUSHER_APP_ID'), $options);
$pusher->trigger('59', 'invitation', ['battle' => 19]);

它完全适用于我的本地环境,但不适用于DigitalOcean服务器。每次都会返回404 NOT FOUND。这是来自pusher的记录消息:

Pusher: ->trigger received string channel "59". Converting to array.
Pusher: create_curl( https://api-eu.pusher.com:443/apps//events?auth_key=&auth_signature=00229d21a6e0e18a854c0732149c306941f46c500d9a8851253bed1821e94f79&auth_timestamp=1490101277&auth_version=1.0&body_md5=42717e3ecc7f7ea6a9c720529330cfb8 )
Pusher: trigger POST: {"name":"invitation","data":"{\"battle\":19}","channels":["59"]}
Pusher: exec_curl response: Array ([body] => 404 NOT FOUND [status] => 404)

你能告诉我导致这个问题的原因吗?

1 个答案:

答案 0 :(得分:1)

我认为DigitalOcean存在问题,请查看here