Zubrag.com
September 09, 2010, 11:05:06 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: Large File PHP Script Timeout  (Read 2606 times)
thrushwolf
Newbie
*
Posts: 1


« on: June 29, 2009, 09:25:52 am »

Hey Guys,

First of all i love the script, and it works wonderfully except on a Windows Server i am using with WAMP and all of its pre-configured variables. I had an old Windows box where everything was configured manually and it worked beautifully but now i am running into an issue.

I have multiple files which exceed 1GB in size and when trying to use them with the script, PHP gets the following error (and lags out httpd in the process and takes forever in general):
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 133959681 bytes)

Like i say, i've never had this problem before on other similar boxes and i have boxes where it is running perfectly with huge files, but i cannot figure out where my problem is with this current box.
I am assuming it is trying to figure out the file size and load it all into memory ... but like i say, ive had it working wonderfully on other boxes and im not sure what the problem is here.
Any help would be appreciated.

Logged
mtg
Newbie
*
Posts: 15


« Reply #1 on: June 30, 2009, 10:11:25 am »

Check your php.ini settings. memory_limit is defaulted to 128MB and it's trying to allocate all of it, which is causing the error. You'd most likely have to set it to -1 to have no memory limit for the script if you are dealing with large files or set it to 2147483648 for 2GBs. May also need to change the max_execution_time to 0 as that is defaulted to 30 seconds and if the script runs longer than that, it will time out.
Logged
Pages: [1]
  Print  
 
Jump to:  

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