php - Allowed memory size exhausted while using Yii datatables


I am using Yii Datatables extension.

My table contains only single row and when I try to open the page that runs query it breaks with following error:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes)

The page works fine when there is no data in the table i.e when I truncate the table, but as I enter even when record then I get above error.

From above error it is evident that it is not memory issue because it only tried to allocate 16384 bytes out of 134217728 bytes available for php process.

What could be the cause of that?




you can increase memory size by increasing default value of

max_allowed_packet = 30M -(this value is what you need to increase)

in my.ini file of db config file.

you can find this file (for xampp) by clicking in xampp mysql config button.

if this doesn't solve please try this.

increase amount of memory script in php.ini file

; Maximum amount of memory a script may consume (128MB) ;





write this in top of your file php, to upgrade memory limit

$old = ini_set('memory_limit', '8192M'); 

People are also looking for solutions to the problem: php - Javascript stops working when I populate the table


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.