使用Iron IO Laravel 4发送邮件

时间:2014-03-10 11:06:54

标签: php laravel laravel-4

我使用命令:

php artisan queue:subscribe laravel http://your-site-url/queue/push

并收到错误:

[Http_Exception]  http错误:0 | SSL证书问题。验证CA证书是否正常。详细说明:

错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败。  失败 queue:subscribe [--type [=“...”]] queue url

我在iron.io注册并在app / config / queue.php中将project_id,token和default key driver添加到iron中

1 个答案:

答案 0 :(得分:5)

这是一个IronIO问题,要在Laravel上规避它,您可以将其添加到app/start/global.php文件中:

Queue::connection()->getIron()->ssl_verifypeer = false;

查看供应商\ iron-io \ iron_mq自述文件:

Troubleshooting

http error: 0

If you see  `Uncaught exception 'Http_Exception' with message 'http error: 0 | '`
it most likely caused by misconfigured cURL https sertificates.
There are two ways to fix this error:

1. Disable SSL sertificate verification - add this line after IronMQ initialization: `$ironmq->ssl_verifypeer = false;`
2. Switch to http protocol - add this to configuration options: `protocol = http` and `port = 80`

此外,您可以直接在IronMQ网站管理页面中手动订阅您的网址:

1. Go to https://hud.iron.io/dashboard

2. On your projects, click in tue MQ button of your project

3. Select the "Queues" tab

4. Click on your queue name, this must be the same you subscribed to using the command "artisan queue:subscribe"

5. In the "PUSH INFORMATION" box, check if your queue push type is set to "multicast".

6. Add a your url in the "SUBSCRIBERS" box.