HTTP Download with Postgresl Blob
| From: | Jeroen Houben | Date: | Fri, 16 Jul 2004 08:15:51 +0000 |
| Subject: | HTTP Download with Postgresl Blob | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13716@lists.php.net to get a copy of this message | ||
Hi,
I read blobs from a postgresql database, using native pg functions (not DB or MDB). Then I want to send this blob as a download which works fine using HTTP_Download's setData() method. Problem is, that sometimes these blobs can be up to 40MB which cause PHP to choke on the memory limit. I tried using setResource() but the pg LO resource, obtained by using pg_lo_open() is not a valid stream resource.
Is there a solution here, or do I just need to up my php memory limit? I was wondering if I could use HTTP download together with pg_lo_read_all(). I'd like to send all the right headers using HTTP_Download and then send the data using pg_lo_read_all(). Is that possible?
TIA
Jeroen