Search code examples
ironmq

Http exception code 0 using IronMQ PHP Client


I am trying out the php client for IronMQ. I'm trying to make work the example provided with the library but for all requests i get the http exception with code 0 and no message. The client is configured ok, with the right token and project id.

For example i try to paste the url for get messages into the browser i get a response with an empty array, which is ok, because i couldn't post any messages onto a queue.

What could be the problem?


Solution

  • If you're on Windows, you'll want to disable ssl_verifypeer.

    1) Be sure you have the latest library from https://github.com/iron-io/iron_worker_php/blob/master/IronWorker.class.php

    2) Disable ssl verify peer like this:

    $worker = new IronWorker(....);
    $worker->ssl_verifypeer = false;
    

    Let me know if that works.