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

  • SEARCH
  • Home
  • 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 6676479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:59:36+00:00 2026-05-26T03:59:36+00:00

I am using centOS 5 server. i got the error while i was attempting

  • 0

I am using centOS 5 server. i got the error while i was attempting to download 1GB of file from server to my server that

maximum execution time exceeded.

i opened my php.ini file, it was written there

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60     ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M      ; Maximum amount of memory a script may consume

in last line it is written Maximum amount of memory a script may consume so what does it mean actually? it will not download more than this per script execution or its about the memory taken by script to be executed (sharing types)
i searched but not got the answer of this. Please if any one can tell me what it mean exactly and how can i be able to download approx 1GB of data through script from other server using PHP.

EDIT

code i am using to download the file from server using curl

$username = "user";
$password = "pwd";
$url = "http://domain.com/feeds/";

global $ch;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
$output = curl_exec($ch);
$r = time()-(24*60*60); 
$dateit = date("Ymd", $r);
$file8 = "abc".$dateit.".tbz";
$file3 = "abc".$dateit.".tbz.md5";
$file5 = "xyz".$dateit.".tbz";
$file4 = "xyz".$dateit.".tbz.md5";
$file7 = "lmn".$dateit.".tbz";
$file2 = "lmn".$dateit.".tbz.md5";
$file6 = "pqr".$dateit.".tbz";
$file1 = "pqr".$dateit.".tbz.md5";
$arr = array($file1, $file2, $file3, $file4, $file5, $file6);
for($i=0;$i<=4;$i++)
{

 $url = "http://domain.com/feeds/current-data/".$arr[$i];
 curl_setopt($ch, CURLOPT_URL, $url);

 $fp = fopen("adminArea/folder1/".$arr[$i], 'w+');
 curl_setopt($ch, CURLOPT_FILE, $fp);
 curl_exec ($ch);

}
fclose($fp);
curl_close($ch);

Any idea help link or view will be highly appreciated.

  • 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-26T03:59:37+00:00Added an answer on May 26, 2026 at 3:59 am

    The memory_limit is the max amount of data the script can have loaded into memory at any given time. That means that if you try and read the entire contents of a 1GB file into a variable, yes, you’ll run into problems.

    On the other hand, if you download the file directly to disk (rather than trying to read its contents in your script), it can be streamed through memory piece by piece, and thus you wouldn’t necessarily run into memory limitations.

    You could also manually read the file chunk by chunk using things like fread() to keep from going over the memory limit at any given time.

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

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm working on setting up a production server using CentOS 5.3, Apache, and Phusion
I'm trying to convert an .avi file to .flv using ffmpeg-php on a centos
I am using phpunit 3.4.15. On Centos 5.3 linux I started Selenium server 1.0.3:
I am using Ruby on Rails on a CentOS-server with apache 2.0. But somehow
I have got Mac on work, Ubuntu on my notebook, CentOS on my server,
I'm converting MP4 videos to FLV using ffmpeg-php on my CentOS server (without intervention
We are currently shifting from using PostgreSQL installed on remote CentOS boxes to using
I am using Tortoise1.6, SubversionEdge for SVN CMS and FileZilla3 (Test Server has CentOS
Using ASP.NET MVC there are situations (such as form submission) that may require a

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.