Re: [PHP] Serving a .dmg via readfile?

2012-04-27 Thread Matijn Woudt
On Thu, Apr 26, 2012 at 8:20 PM, Brian Dunning wrote: > Thanks, this suggestion from Dante completely solved the problem. > > Replaced: > > readfile('/var/www/mypath/My Cool Image.dmg'); > > With: > > $fd = fopen ('/var/www/mypath/My Cool Image.dmg', "r"); > while(!feof($fd)) { >    set_time_limit

Re: [PHP] Serving a .dmg via readfile?

2012-04-26 Thread Brian Dunning
Thanks, this suggestion from Dante completely solved the problem. Replaced: readfile('/var/www/mypath/My Cool Image.dmg'); With: $fd = fopen ('/var/www/mypath/My Cool Image.dmg', "r"); while(!feof($fd)) { set_time_limit(30); echo fread($fd, 4096); flush(); } fclose ($fd); It's now

Re: [PHP] Serving a .dmg via readfile?

2012-04-25 Thread Tommy Pham
On Wed, Apr 25, 2012 at 9:04 PM, Tommy Pham wrote: > On Wed, Apr 25, 2012 at 8:54 PM, Brian Dunning wrote: >> Hey all - I'm having no luck serving a .dmg from my online store. I stripped >> down the code to just the following to debug, but no matter what I get a >> zero-byte file served: >> >>

Re: [PHP] Serving a .dmg via readfile?

2012-04-25 Thread D. Dante Lorenso
On 4/25/12 10:54 PM, Brian Dunning wrote: Hey all - I'm having no luck serving a .dmg from my online store. I stripped down the code to just the following to debug, but no matter what I get a zero-byte file served: header('Content-Type: application/x-apple-diskimage'); // also tried octe

Re: [PHP] Serving a .dmg via readfile?

2012-04-25 Thread Tommy Pham
On Wed, Apr 25, 2012 at 8:54 PM, Brian Dunning wrote: > Hey all - I'm having no luck serving a .dmg from my online store. I stripped > down the code to just the following to debug, but no matter what I get a > zero-byte file served: > >  header('Content-Type: application/x-apple-diskimage');   /

[PHP] Serving a .dmg via readfile?

2012-04-25 Thread Brian Dunning
Hey all - I'm having no luck serving a .dmg from my online store. I stripped down the code to just the following to debug, but no matter what I get a zero-byte file served: header('Content-Type: application/x-apple-diskimage'); // also tried octet-stream header('Content-Disposition: attac