Kiy*_*ash 6 php ssl websocket laravel
我正在使用由 beyoundcode 编写的 Laravel websocket。
几天后,我已经连接myDomain.com/laravel-websockets并解决了第一步。
但是现在,当我触发时event,laravel 在这一点上出现错误:
/public_html/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php
**at line 117-(in my case)-**
Run Code Online (Sandbox Code Playgroud)
这是我的堆栈跟踪屏幕截图:
我阅读了这些问题和问题,但没有对我有用:
Laravel Pusher 异常:“Illuminate\Broadcasting\BroadcastException”
例外:Illuminate \ Broadcasting \ BroadcastException PusherBroadcaster.php:119 中没有消息
Laravel pusher Illuminate\Broadcasting\BroadcastException 无消息
但他们都没有帮助我。
我也看到了这些issue:
在队列中运行时,PusherBroadcaster 异常“无法连接到 Pusher”
并根据此评论,我用以下内容更新了我的php.ini文件:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="/etc/pki/tls/certs/ca-bundle.crt"
these options tested too:
curl.cainfo ="/etc/pki/tls/cert.pem"
curl.cainfo ="/etc/pki/tls/certs/ca-bundle.crt"
Run Code Online (Sandbox Code Playgroud)
我确实在 localhost 中测试了这个场景,一切似乎都很好,我想我的 ssl 有问题,所以为了更多细节,我不得不说我正在使用vps那个用途linux centos7,我的控制面板是directadmin,我用letsencrypt我的控制面板使用https。
有谁知道我的问题是什么?
提前致谢
cert keys就我而言,当我将我的路径放入 apache 可以访问这些文件的路径时,问题就解决了。
我确实添加了带有这些值的curl选项数组:
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'host' => '127.0.0.1',
'port' => 6001,
'scheme' => 'https',
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
]
Run Code Online (Sandbox Code Playgroud)
然后不要忘记:
php artisan 缓存:清除
php artisan 配置:清除
希望这能治愈你的头痛,因为我的也是如此。
| 归档时间: |
|
| 查看次数: |
1341 次 |
| 最近记录: |