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 | {"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 />
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.
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.
Related
I'm using the PHP Google Cloud Storage library (https://github.com/googleapis/google-cloud-php-storage) to upload .msg (outlook message export) files.
However while it works most of the time I'm getting the error below for about 1 in 200 files.
PHP Fatal error: Uncaught Google\Cloud\Core\Exception\BadRequestException: Malformed multipart body. in /home/jamie/import_systems/vendor/google/cloud-core/src/RequestWrapper.php:368
Stack trace:
#0 /home/jamie/import_systems/vendor/google/cloud-core/src/RequestWrapper.php(207): Google\Cloud\Core\RequestWrapper->convertToGoogleException()
#1 /home/jamie/import_systems/vendor/google/cloud-core/src/Upload/MultipartUploader.php(44): Google\Cloud\Core\RequestWrapper->send()
#2 /home/jamie/import_systems/vendor/google/cloud-storage/src/Bucket.php(294): Google\Cloud\Core\Upload\MultipartUploader->upload()
#3 /home/jamie/import_systems/file_uploader.php(47): Google\Cloud\Storage\Bucket->upload()
#4 /home/jamie/import_systems/file_uploader.php(18): UploadAndLinkUpAttachments()
#5 {main}
thrown in /home/jamie/import_systems/vendor/google/cloud-core/src/RequestWrapper.php on line 368
Interestingly I can upload the same files without any issues through the Cloud Storage GUI into the same bucket.
I've checked the library for any encoding options/config but can't see any. I understand its something about the .msg files structure but I would have assumed the library would see that and escape it.
What could the issue be? Or where can I start to debug this?
I recently installed git for sharing cakephp 3.0 code but after pushing and pulling the browser seems blank then I edit .gitignore file and remove all commands excluding /tem/* because I didn't worry about security right now and then I shared my code and got this error:
Fatal error: Class 'Psr\Log\AbstractLogger' not found in /var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/Engine/BaseLog.php on line 24
Fatal error: Uncaught RuntimeException: Could not load class Cake\Log\Engine\FileLog in /var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php:57 Stack trace: #0
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(91): Cake\Log\LogEngineRegistry->_throwMissingClassError('Cake\\Log\\Engine...', NULL) #1
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/Log.php(198): Cake\Core\ObjectRegistry->load('Cake\\Log\\Engine...', Array) #2
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/Log.php(180): Cake\Log\Log::_loadConfig() #3
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/Log.php(360): Cake\Log\Log::_init() #4
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(284): Cake\Log\Log::write(3, 'Fatal Error (1)...') #5
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(216): Cake\Error\BaseErrorHandler->_logError(3, Array) #6
/var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Error/Bas in /var/www/html/project/bmw12/vendor/cakephp/cakephp/src/Log/LogEngineRegistry.php on line 57
I m posting answer for my question, actually its a permission issue in Linux and therefore it doesn't allow to share all the file while using push command in git but while using it doesn't show any error but it doesn't work properly on other end.
I just moved my website to a separate server in an attempt to make sure that when I push the site to the production server everything transitions smoothly. Unfortunately, the site appears blank when I visit the link unless I add something like "echo 'hello';" to the index.php page, nothing is being logged in the laravel storage files (even though the permissions are recursively set to 777), and I get this error:
nickstaging#ubuntuStaging:/var/www/html/almost_acceptable$ php artisan config:cache
PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var
/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('log')
#4 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/html/almost_acceptable/vendor/laravel/framework/src/I in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741
PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('log')
#4 /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/html/almost_acceptable/vendor/laravel/framework/src/I in /var/www/html/almost_acceptable/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741
I cannot, for the life of me, figure out why it's occurring. It is recorded in the apache log file on the server. The site still runs correctly on my local homestead vm that I have running for general testing, and I tried reuploading all of the files to the server but nothing has worked.
If anyone has any idea why this is occurring, that would be great and I would very much appreciate it! Thanks in advance!
Edit
Installing php-mysql did not fix the problem and there was no difference in the error afterwards.
The most common problem is either you have spaces in your .env file or a wrong value in one of your config files.
More info here:
https://laracasts.com/discuss/channels/general-discussion/class-log-does-not-exist
The error below only occurs when I upload my code to the server. When I'm on my local development environment works perfectly. My local is Windows and my Production is Linux.
What does this mean? What should I do to solve it?
Fatal error: Uncaught exception 'CloudKey_RPCException' with message 'You must provide an url for mp4_h264_aac' in /var/www/application/libraries/CloudKey.php:336 Stack trace: #0 /var/www/application/libraries/VideoUploader.php(56): CloudKey_Api->__call('create', Array) #1 /var/www/application/libraries/VideoUploader.php(56): CloudKey_Media->create(Array) #2 /var/www/application/controllers/Admin.php(519): VideoUploader->upload(Array, Array, '06d88cc1721cbe1...') #3 [internal function]: Admin->videos('upload') #4 /var/www/system/core/CodeIgniter.php(356): call_user_func_array(Array, Array) #5 /var/www/public/index.php(274): require_once('/var/www/system...') #6 {main} thrown in /var/www/application/libraries/CloudKey.php on line 336
Ok, in case anyone ever needs this. The problem is that, I was using the $_FILES['file']['tmp_name'] directly into DMCloud method. Turns out that on Windows, it's something like C:\temp\file.tmp and on linux is something like /tmp/file. DMCloud api requires that the file used for upload must have an extension.
So, it failed to upload the file, and when I tried to use the URL of the failed upload, it gaveme this exception.
I hope someone fin this hopeful in the future =)
Have any of you encountered this error before while running the demo of WURFL? I am tyring to user WURFL to redirect our mobile site visitors to different content but this error is not letting me go ahead.
Here is the error Detail:
Fatal error: Uncaught exception 'WURFL_WURFLException' with message 'The ZipArchive extension is not loaded. Load the extension or use the flat wurfl.xml file' in /var/www/bpaudel/wurfl-php-1.4.1/WURFL/Xml/Utils.php:49 Stack trace: #0 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/Xml/Utils.php(36): WURFL_Xml_Utils::getZippedFile('/var/www/bpaude...') #1 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/Xml/AbstractIterator.php(47): WURFL_Xml_Utils::getXMLFile('/var/www/bpaude...') #2 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/DeviceRepositoryBuilder.php(83): WURFL_Xml_AbstractIterator->__construct('/var/www/bpaude...') #3 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/WURFLManagerFactory.php(150): WURFL_DeviceRepositoryBuilder->build('/var/www/bpaude...', NULL) #4 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/WURFLManagerFactory.php(134): WURFL_WURFLManagerFactory->deviceRepository(Object(WURFL_Storage_File), Object(WURFL_UserAgentHandlerChain)) #5 /var/www/bpaudel/wurfl-php-1.4.1/WURFL/WURFLManagerFactory.php(77): WURFL_WURFLManagerFactory->init() #6 /var/w in /var/www/bpaudel/wurfl-php-1.4.1/WURFL/Xml/Utils.php on line 49
In the error, it also says "use the flat wurfl.xml" file. How would we use wurfl.xml as an alternative?
Thanks,
Bishnu