php - MultipartUpload error -


i'm working amazon s3 , aws sdk php.

i'm trying use multipartupload upload files have error:

php catchable fatal error: argument 2 passed guzzle\service\client::getcommand() must of type array, string given, called in /var/www/html/aws/guzzle/service/client.php on line 76 , defined in /var/www/html/aws/guzzle/service/client.php on line 79

this error occurs when put more 10 simultaneous uploads.

anyone knows why?

php: (connection.php)

use aws\common\exception\multipartuploadexception; use aws\s3\model\multipartupload\uploadbuilder; use aws\s3\s3client;  $uploaded = (object) $_files['uploaded_file'];   $this->file  = $uploaded->tmp_name;  $arrayconfig =  array(             'key'    => $this->accesskey,             'secret' => $this->secretkey         );  $this->awsclient = s3client::factory($arrayconfig);  $uploader = uploadbuilder::newinstance()             ->setclient($this->awsclient)             ->setsource($this->file)             ->setbucket($this->bucket)             ->setkey($this->file_name_id)             ->build(); 

i have crontab service 10 commands @ same time:

*/05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php */05 * * * * /usr/bin/php /home/user/upload_test.php 

upload_test.php:

$local_file = '/home/user/file.zip';  $ch = curl_init(); curl_setopt( $ch, curlopt_header, 0 ); curl_setopt( $ch, curlopt_verbose, 0 ); curl_setopt( $ch, curlopt_returntransfer, true ); curl_setopt( $ch, curlopt_useragent, "mozilla/4.0 (compatible;)" ); curl_setopt( $ch, curlopt_post, true ); curl_setopt( $ch, curlopt_url, 'http://localhost/connection.php' );  $post_array = array(     "uploaded_file" => "@" . $local_file,     "function" => "upload" ); curl_setopt( $ch, curlopt_postfields, $post_array ); $response = curl_exec( $ch ); 


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -