Author Topic: problem with downloading zip files  (Read 18662 times)

0 Members and 1 Guest are viewing this topic.

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
problem with downloading zip files
« on: November 17, 2005, 07:57:39 PM »
Hello

After I rebuild my website script again, some problems came out

One of the problems is this one

Code: [Select]
http://www.racing4e.com/img1631.html
Press this button under zip photo and see what happen,

Some visitor say it will gave them the file as download.zip, and this is very critical for the server
Some other say it will view the zip file on the browse!!

Please advice me for this issue

Best regards,

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #1 on: November 17, 2005, 11:44:34 PM »
did you modify download.php ?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #2 on: November 18, 2005, 12:52:52 AM »
Dear V@no

Thank you for your reply
I didn’t modify the file download.php

But just in case I will replace it with the original and i will let you know

Regards,

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #3 on: November 18, 2005, 12:57:58 AM »
Dear V@no

I replace the file with the original but the problem is stall remaining


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #4 on: November 18, 2005, 01:06:45 AM »
are you using download URL for the files?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #5 on: November 18, 2005, 04:57:10 PM »
Dear V@no

Yes i am using ULR download , and the file is inside the website

Waiting for your advice.

Regards,

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #6 on: November 19, 2005, 10:26:25 PM »
Dear V@no

I am upgrading PHP to 5.0.5 and removing safe mode form the server
I am hopping that it maybe fixes it

I am still waiting for your advice

Best regards,

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #7 on: November 20, 2005, 03:51:35 AM »
For testing purposes in download.php find:
Code: [Select]
function get_file_data($file_path) {Insert below:
Code: [Select]
echo $file_path;
exit;
It should show you the path to the file on blank page when you hit download button.
Please post what it show.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #8 on: November 20, 2005, 10:06:47 PM »
why do u use URL again? :?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #9 on: November 21, 2005, 02:55:24 AM »
why do u use URL again? :?

Sorry I didn’t understand you

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #10 on: November 21, 2005, 06:22:58 AM »
Why do you use "Download URL" if it points to the same file (?) that is added to your 4images?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #11 on: November 21, 2005, 06:47:16 PM »
Dear V@no

i made the following changeing by editing the database and that is the final cut


the file chmod is 0777

the problem is still there on the following link
http://www.racing4e.com/download.php?image_id=1631

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #12 on: November 22, 2005, 01:31:51 AM »
Ok, the file is how big?! only 200+MB???
I doubt any servers would allow more then 10mb memory per script, and sure not 200+mb!

I guess, you'll have to stick with direct url as you were doing before and do the following patch to download.php:
find:
Code: [Select]
    if (is_remote_file($image_row['image_download_url']) || is_local_file($image_row['image_download_url'])) {
      ereg("(.+)\.(.+)", basename($image_row['image_download_url']), $regs);
      $file_name = $regs[1];
      $file_extension = $regs[2];

      $file['file_name'] = $file_name.(($size) ? "_".$size : "").".".$file_extension;
      $file['file_path'] = dirname($image_row['image_download_url'])."/".$file['file_name'];
    }
    else {
      $file['file_path'] = $image_row['image_download_url'];
      $remote_url = 1;
    }
Replace it with:
Code: [Select]
    $file['file_path'] = $image_row['image_download_url'];
    $remote_url = 1;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline abdoh2010

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Racing 4 Education
Re: problem with downloading zip files
« Reply #13 on: November 22, 2005, 06:34:45 PM »
i made the changes,

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with downloading zip files
« Reply #14 on: November 23, 2005, 12:21:05 AM »
When you are using download URL, there should be NO "zip" download button, yet, its present on your page. I have no clue what else changes you made.

Pressing either of download button returns no responce from your server, the only explanation I have for this is that your server crashes at that moment. You'll need get access to the server error logs.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)