Note that there are some explanatory texts on larger screens.

plurals
  1. POshell_exec unzip file size limit
    primarykey
    data
    text
    <p>I'm using the code below to download a zip file from another server which contains over 1,000 images. The source zip file is being downloaded and created / copied to my server, but the code seems to stop at that point. The echo output from the if else below doesn't even display.</p> <p>I originally had the CURLOPT_TIMEOUT set to 240, but that was not long enough. I would get the curl timeout error. With the zip file being near 100MB I figured it would take about 15 minutes to complete. So I set CURLOPT_TIMEOUT set to 1200 since the source zip size will vary from day to day.</p> <p>Any idea as to why it stops working? Is there a setting that needs to be changed?</p> <pre><code>$source_photos_file = 'source_photos_file.zip'; $curl = curl_init(); $destination_photos_file = fopen($_SERVER['DOCUMENT_ROOT'].'/files/photos.zip', 'w'); curl_setopt($curl, CURLOPT_URL, FTP_URL.$source_photos_file); #input curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl, CURLOPT_TIMEOUT, 1200); curl_setopt($curl, CURLOPT_FILE, $destination_photos_file); #output if (curl_exec($curl) === false) { echo '&lt;p&gt;Curl error: ' . curl_error($curl). ' - error # '.curl_errno($curl).'&lt;/p&gt;'; } else { echo '&lt;p&gt;Done without any errors&lt;/p&gt;'; } curl_close($curl); fclose($destination_photos_file); $photos_unzip_result = shell_exec('unzip -P password '.$_SERVER['DOCUMENT_ROOT'].'/files/photos.zip -d '.$_SERVER['DOCUMENT_ROOT'].'/files/pics_test/'); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload