使用 PHP 将代码推送到 IRON.io 时出错
Error pushing code to IRON.io using PHP
我正在尝试使用 PHP 和 cURL 将 zip 文件推送到 iron.io,但我总是收到此错误。
- 我的队友能做到,我也能做到,但是会产生那个异常。
有人有同样的错误或问题吗?有任何想法吗 ?我有点绝望谢谢
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 | {"msg":"Code package zip file required if no image specified or using iron/images."}' 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->reportHttpError(400, '{"msg":"Code pa...')
#1 /Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php(305): IronCore->callWithRetries()
#2 /Applications/MAMP/htdocs/www/application/libraries/ironworker/IronWorker.class.php(303): IronCore->apiCall('POST', 'projects/560c4e...', Array, Array)
#3 /Applications/MAMP/htdocs/www/application/libraries/ironworker/CIWorker.php(61): IronWorker->postCode('ironio.php', '/Applications/M...', 'lumiary-stage')
#4 /Applications/MAMP/htdocs/www/application/controllers/admin/tools.php(52): CIWorker->package('lumiary-stage')
#5 [internal function]: Tools->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 />
您的请求格式错误(400 状态码表示错误请求)。您还会在错误描述中得到解释:如果未指定图像或使用 iron/images.
,则需要代码包 zip 文件
最终的解决方案是更改我的 PHP 版本。我从 5.6 移动到 5.4,这有所不同,一切都按预期工作。
我正在尝试使用 PHP 和 cURL 将 zip 文件推送到 iron.io,但我总是收到此错误。 - 我的队友能做到,我也能做到,但是会产生那个异常。 有人有同样的错误或问题吗?有任何想法吗 ?我有点绝望谢谢
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 | {"msg":"Code package zip file required if no image specified or using iron/images."}' 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->reportHttpError(400, '{"msg":"Code pa...')
#1 /Applications/MAMP/htdocs/www/application/libraries/ironmq/IronCore.class.php(305): IronCore->callWithRetries()
#2 /Applications/MAMP/htdocs/www/application/libraries/ironworker/IronWorker.class.php(303): IronCore->apiCall('POST', 'projects/560c4e...', Array, Array)
#3 /Applications/MAMP/htdocs/www/application/libraries/ironworker/CIWorker.php(61): IronWorker->postCode('ironio.php', '/Applications/M...', 'lumiary-stage')
#4 /Applications/MAMP/htdocs/www/application/controllers/admin/tools.php(52): CIWorker->package('lumiary-stage')
#5 [internal function]: Tools->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 />
您的请求格式错误(400 状态码表示错误请求)。您还会在错误描述中得到解释:如果未指定图像或使用 iron/images.
,则需要代码包 zip 文件最终的解决方案是更改我的 PHP 版本。我从 5.6 移动到 5.4,这有所不同,一切都按预期工作。