Author Topic: Download Button URL not working  (Read 13436 times)

0 Members and 1 Guest are viewing this topic.

Offline pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Download Button URL not working
« on: September 20, 2011, 01:06:19 PM »
i have set correct download link for download button but when i click on download button its download 0 Bytes file

when i put this link directly in browser then it will download fine

how to fix this issue ?

Note: GD is not install on server

Also pls suggest me if any other tools need to install on server for 4images

Thanks in advanced

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: Download Button URL not working
« Reply #1 on: September 21, 2011, 01:47:10 AM »
1) What is php version?
2) can you post an example of download url (you can alter the domain)
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #2 on: September 21, 2011, 08:49:57 PM »
PHP version    5.2.17

Post Sample

http://cell11.info/r_free_mobile_software_1_symbian%5E3_mobile_software_14_download_yaulu_address_book_for_symbian%5E3_1390.html
just click on Download Button

you will see download software 0 byets

this download button link is:

http://www.cell11.info/software/yaulu.zip

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: Download Button URL not working
« Reply #3 on: September 22, 2011, 12:29:24 AM »
In global.php find:
error_reporting(E_ERROR E_WARNING E_PARSE);
Temporary insert below:
error_reporting(E_ALL);

Try download and check error logs for any errors.
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #4 on: September 22, 2011, 08:05:14 AM »
erro_log
[22-Sep-2011 06:58:35] PHP Notice:  Use of undefined constant MAIN_SCRIPT - assumed 'MAIN_SCRIPT' in /home/cell11/public_html/includes/page_header.php on line 85
[22-Sep-2011 06:58:35] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/cell11/public_html/includes/page_header.php:85) in /home/cell11/public_html/rss.php on line 358
[22-Sep-2011 06:58:35] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/cell11/public_html/includes/page_header.php:85) in /home/cell11/public_html/rss.php on line 359
[22-Sep-2011 06:58:35] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/cell11/public_html/includes/page_header.php:85) in /home/cell11/public_html/rss.php on line 360
[22-Sep-2011 06:58:35] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/cell11/public_html/includes/page_header.php:85) in /home/cell11/public_html/rss.php on line 361

page_header.php on line 85
$file = get_file_name(basename(MAIN_SCRIPT));

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: Download Button URL not working
« Reply #5 on: September 22, 2011, 05:16:42 PM »
What is  your 4images version? Did you install it fresh or updated it, if update, then from which version?

Whatever download.php version you are using it's not original from v1.7.10
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #6 on: September 22, 2011, 09:28:43 PM »
4images: Version: 1.7.10
i have just restore my account to one server to another server after this transfer i am receiving this error
Thanks in advanced

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: Download Button URL not working
« Reply #7 on: September 22, 2011, 11:38:47 PM »
Try re-upload download.php file from 4images package.
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #8 on: September 23, 2011, 08:57:32 AM »
i have download 4images new pack and reupload download.php
but same issue

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: Download Button URL not working
« Reply #9 on: September 25, 2011, 12:47:34 AM »
Ok, do you get any messages when you trying download a file? The messages you showed are not related to the issue right now.
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #10 on: October 02, 2011, 08:30:31 AM »
Hello
there is no any error when try to download just when some one download file. the download file size show 0 bytes size
pls advise if any script need to install on server i will install
Thank you
« Last Edit: October 02, 2011, 08:48:04 AM by pkwebhost »

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: Download Button URL not working
« Reply #11 on: October 02, 2011, 05:23:30 PM »
There must be some server limitations. Try to remove @ from this line in download.php:
  @readfile($file_path);
And check error logs again.

My guess is allow_url_fopen is disabled in php.ini (check phpinfo()) If so, you'll need enable it or contact your server's administrator to do so for you.
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 pkwebhost

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Download Button URL not working
« Reply #12 on: October 03, 2011, 05:42:40 PM »
Thank you
after enable allow_url_fopen now its working fine

Thanks a lot

Offline ciprianmp

  • Newbie
  • *
  • Posts: 29
  • Php just rocks!
    • View Profile
    • My site
Re: Download Button URL not working
« Reply #13 on: February 01, 2012, 09:52:20 PM »
Hello V@no, long time no see!
I have the same header error in my gallery, after upgrading to 1.7.10.
My phpinfo() shows allow_url_include is off, while allow_url_fopen is on.
I get this error in category.php while browsing, but the similar error as pkwebhost I get on rss.php:
Code: [Select]
Notice: Use of undefined constant MAIN_SCRIPT - assumed 'MAIN_SCRIPT' in /home/ciprian/public_html/gallery/includes/page_header.php on line 85

Warning: Cannot modify header information - headers already sent by (output started at /home/ciprian/public_html/gallery/includes/page_header.php:85) in /home/ciprian/public_html/gallery/rss.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /home/ciprian/public_html/gallery/includes/page_header.php:85) in /home/ciprian/public_html/gallery/rss.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /home/ciprian/public_html/gallery/includes/page_header.php:85) in /home/ciprian/public_html/gallery/rss.php on line 360

Warning: Cannot modify header information - headers already sent by (output started at /home/ciprian/public_html/gallery/includes/page_header.php:85) in /home/ciprian/public_html/gallery/rss.php on line 361
http://ciprianmp.com/gallery Wed, 01 Feb 2012 20:49:50 GMT http://ciprianmp.com/gallery/details.php?image_id=419 Mon, 30 Jan 2012 19:20:44 GMT My puppy ...

I get no error on the index.php file though.
Can you find a fix please? (other than having hosting people change php.ini directives?)
Thank you!

Later edit:
I just imported the gallery to my Windows Wamp server so I could enable both allow_url_... I still get an error, but different:
Code: [Select]
This page contains the following errors:

error on line 2 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
There's nothing else on the page.
In category browsing is still the same error:
Notice: Use of undefined constant MAIN_SCRIPT - assumed 'MAIN_SCRIPT' in C:\wamp\www\home\gallery\includes\page_header.php on line 85

So I would shoot on that line in page_header.php:
$file get_file_name(basename(MAIN_SCRIPT));

php=5.2.17
apache=2.2.21
« Last Edit: February 01, 2012, 10:35:54 PM by ciprianmp »

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: Download Button URL not working
« Reply #14 on: February 02, 2012, 04:56:49 AM »
Looks like your gallery wasn't properly upgraded. In v1.7.10 every "main" php file in the 4imagers root directory has MAIN_SCRIPT defined. Your files seems to missing that line.
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)