Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6356841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:02:52+00:00 2026-05-24T23:02:52+00:00

Problem : I am having difficulty with reliably sending numerous files via HTTP Post

  • 0

Problem :

I am having difficulty with reliably sending numerous files via HTTP Post from one web server to another.

I’ve noticed the success of files being transferred over is dependent on the size and amount of files I choose to send.

What I constitute as a successful transfer is if all files sent from the source server appear in the directory of the receiving server.

//sender script

$ch = curl_init();

$data = array(
    'file1' => '@/var/www/html/uploadtest/largerfile.zip',
    'file2' => '@/var/www/html/uploadtest/largerfile.zip',
    'file3' => '@/var/www/html/uploadtest/smallerfile.zip'
);

curl_setopt($ch, CURLOPT_URL, 'http://domain.com/test/reciever.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$res = curl_exec($ch);

if(curl_exec($ch)){
    print "Error: " . curl_error($ch);
}

echo $res;

//recieving script

print_r($_FILES); //outputs as blank array on failed transfer
move_uploaded_file( $_FILES["file1"]["tmp_name"], "file1.zip" );
move_uploaded_file( $_FILES["file1"]["tmp_name"], "file2.zip" );
move_uploaded_file( $_FILES["file1"]["tmp_name"], "file3.zip" );

With the current files being sent across none of them arrive at their destination. If I remove one largerfile.zip then the file transfer is successful.

I am looking for error responses by printing $res but I don’t see any despite a failed transfer. *curl_errno* also does not detect anything.

Background :

I’ve been recommended to use FTP previously but the Web API I’ll be using only accepts POST. It’s also likely that the files I need to transfer are around 50mbs.

I’ve also tried changing the following php.ini settings to :

  • post_max_size : 100M
  • upload_max_size : 60M
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:02:53+00:00Added an answer on May 24, 2026 at 11:02 pm

    You wrote:

    It’s also likely that the files I need to transfer are around 50mbs.

    I assume you refer to the filesize on your harddisk per each file.

    max_upload_size : 60M (don’t you mean upload_max_filesize?!)
    post_max_size : 100M

    There is a third setting related to file-uploads: memory_limit. That is because those files will be loaded into memory before saved to disk on the server.

    You want to transfer three files at once. Every file is about 50 mb. Let’s just sum it up:

    50 mb + 50 mb + 50 mb = 150 mb
    

    That means:

    • upload_max_filesize (!!) of 60 mb is too low, in case it counts for all three files at once (I can’t remember from top of my head if that is the case or not).
    • post_max_size of 100 mb is definitely too low, you will need a higher value here, at least 150m and add a bit more on top. See the manual entry for more info.
    • memory_limit is unknown but it’s highly like that it is too low, too.

    For testing set memory_limit to 0 (unlimited) and play around with upload_max_filesize and post_max_size to match your needs.

    I hope this helps you to solve your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey, I'm having some difficulty with CSS and IE6 compatibility. URL : http://bit.ly/dlX7cS Problem
We are having problem with the server migration. We have one application that are
I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I
I have been trying to tackle this problem , but I am having difficulty
I've been having some difficulty in understanding the source of a problem. Below is
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I am having difficulty with code igniter routing. http://www.mysite.com goes to the right controller
I am having difficulty to explain this problem, but I will try anyway. I
I am having difficulty in consuming the reCaptcha Web Service using C#/.Net 3.5. Although
I'm having difficulty extracting a single node value from a nodelist. My code takes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.