These type of errors come when allocated memory is lesser . So
allocated memory in PHP INI needs to be increased .
Regards,
Deepesh
On Dec 2, 8:14 am, "php.baker" <php.ba...@gmail.com> wrote:
> I would not bump the memory allowance unless I was sure it was
> absolutely necessary.
>
> > What is the appropriate way to deal with this kind of problem?
>
> It's hard to know the "appropriate " way without knowing more about
> your app, but here are a couple suggestions.
>
> 1. Make sure you have recursive set to 0... If each of those 1500
> records has related data, and cake is fetching all of them, then
> setting recursive to 0 will probably fix the problem.
>
> 2. Page the records.
> fetch couple hundred records at a time
> write those records to a temp excel file on your server
> then let the customer download the file
>
> 3. If that doesn't work, tell us more about your app and your data.
>
> On Dec 1, 6:34 pm, lemp <goo...@forgenumerique.com> wrote:
>
> > I have create a function to export database tables to Excel files.
>
> > When my result set reach around 1500 rows, I start getting memory
> > errors.
>
> > I worked around the download issue using the flush() function but I
> > now get errors like:
>
> > Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
> > allocate 40 bytes) in /dev/cake/libs/model/datasources/dbo/
> > dbo_mysql.php on line 452
>
> > What is the appropriate way to deal with this kind of problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment