1

I'm trying to push a zip file to iron.io using PHP with cURL but I always get this error. -My teammates are able to do it, and I do the same, but that exception is generated. Have someone had the same error or problem? any ideas ? I'm kind of desperate thanks

API POST: 'https://worker-aws-us-east-1.iron.io:443/2/projects/560c4ef63dc302XXXXXXX/codes'
<br />
<b>Fatal error</b>:  Uncaught exception 'Http_Exception' with message 'http error: 400 | {&quot;msg&quot;:&quot;Code package zip file required if no image specified or using iron/images.&quot;}' in /Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php:352
Stack trace:
   #0 /Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php(343): IronCore-&gt;reportHttpError(400, '{&quot;msg&quot;:&quot;Code pa...')
   #1 /Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php(305): IronCore-&gt;callWithRetries()
   #2 /Applications/MAMP/htdocs/www/application/libraries/ironworker/IronWorker.class.php(303): IronCore-&gt;apiCall('POST', 'projects/560c4e...', Array, Array)
   #3 /Applications/MAMP/htdocs/www/application/libraries/ironworker/CIWorker.php(61): IronWorker-&gt;postCode('ironio.php', '/Applications/M...', 'lumiary-stage')
   #4 /Applications/MAMP/htdocs/www/application/controllers/admin/tools.php(52): CIWorker-&gt;package('lumiary-stage')
   #5 [internal function]: Tools-&gt;package('lumiary-stage')
   #6 /Applications/MAMP/htdocs/www/sy in <b>/Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php</b> on line <b>352</b><br />
andr3s2
  • 238
  • 3
  • 10
  • 1
    Your request is malformed (400 = bad request). You also get an explanation in the error description: Code package zip file required if no image specified or using iron/images. – Mihai Caracostea Dec 02 '15 at 15:44
  • @MihaiCaracostea you should put that as an answer instead of a comment. – Travis Reeder Dec 02 '15 at 17:38
  • @TravisR I've posted it as an answer. Cheers! – Mihai Caracostea Dec 02 '15 at 18:24
  • @MihaiCaracostea thank you for your comment, the issue is that my team mates are able to upload the file with the exactly the same code. They don't get that error. It could be something in my enviroment but I'm not sure because all we use Apache in MAMP. – andr3s2 Dec 03 '15 at 17:43

2 Answers2

0

Your request is malformed (400 status code means Bad Request). You also get an explanation in the error description: Code package zip file required if no image specified or using iron/images.

Mihai Caracostea
  • 8,336
  • 4
  • 27
  • 46
0

The final solution was to change my PHP Version. I moved from 5.6 to 5.4 and that did the difference and everything worked as expected.

andr3s2
  • 238
  • 3
  • 10