cURL, PHP, and Out Of Memory?

cURL, PHP, and Out Of Memory?

Posted by: lrhb
Posted on: 2007-08-26 22:46:00

I've got some PHP script to try and deliver some files for download... originally it used readfile, but that didn't work out so well with Dreamhost, so I recoded it to use cURL instead. The download works perfect for a smaller zip file, about 3.5MB, but for the larger file, a little over 300MB, I get a file with the following:

<br />
<b>Warning</b>: curl_setopt(): supplied argument is not a valid cURL handle resource in [...] on line <b>53</b><br />
<br />
<b>Fatal error</b>: Out of memory (allocated 75759616) (tried to allocate 75501890 bytes) in [...] on line <b>60</b><br />

I'm not too sure where the problem lies... is it in the PHP? cURL commands?

Any help would be greatly appreciated... Thank you!

Re: cURL, PHP, and Out Of Memory?

Posted by: gordaen
Posted on: 2007-08-28 10:45:00

PHP has a memory limit specified in the ini file and 300mb is over that limit. Are you trying to relay files?

Tags: php scriptdreamhostmemory