Zubrag.com
May 22, 2012, 09:39:30 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: I am in need of help fast please  (Read 1537 times)
manofgod1993
Newbie
*
Posts: 3


« on: October 03, 2010, 11:49:25 am »

Wonderful Script. Only one that I can find that will work with my webserver.

One problem. When i try to download .ppt files, it corrupts them.

When I open it in a text editor, looking for some things that other people said it has added; I see this
Code:
<br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br />
<b>Warning</b>:  set_time_limit() has been disabled for security reasons in <b>/home/a5011047/public_html/powerpoints/download-file.php</b> on line <b>81</b><br />
<br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table>

at the beginning of my ppt file.

Im almost positive that's what is causing it to mess up, but why?

Please help me :/

I have done a lot of work with php but this one is stumping me..

Logged
manofgod1993
Newbie
*
Posts: 3


« Reply #1 on: October 03, 2010, 01:09:56 pm »

 [Resolved]

Okay, after some tampering with the download.php script.. My server doesnt allow set_time_limit()

Sooo..
I deleted the
Code:
// Make sure program execution doesn't time out
// Set maximum script execution time in seconds (0 means no limit)
set_time_limit(1000000);

and all works fine! Smiley

Hope this can help someone else
Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #2 on: October 03, 2010, 01:51:11 pm »

Thanks for sharing.

Be aware that server usually breaks download after 30 seconds if this code is removed. This means download of relatively big files on slow connections which take more than 30 seconds will not succeed. Time limit gets set by your hosting provider, so may differ from default value of 30 secs.
Logged
manofgod1993
Newbie
*
Posts: 3


« Reply #3 on: October 03, 2010, 01:57:04 pm »

Oh Thanks!!

Didn't know that.. This is the first online host that i've used, ive always hosted myself.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC