increase memory limit on wamp

I have wamp64 and php version 5.6.16 and apache 2.4.17. I have a 4gb ram win7 pc

I am running a cakephp project and keep getting an error when displaying rows from a table

Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4145278 bytes)

To increase the memory there is no php.ini so I changed the memory_limit = 2048M in php-production.ini but I'm not sure if I edited the correct file.

This has no effect as I still get the same error. Am I able to increase the memory limit and do I do this in which file? I seem to be stuck on this amount of memory 134217728

I didn't make sense of past replies on the topic as the file php.ini doesn't exist in this wamp


Solution 1:

The php.ini file usually is on "C:\wamp64\bin\php\php_ver" where "php_ver" is the version of the PHP you are using (please note the latest version of wamp includes two version of PHP, make sure you edit the right php.ini file)

then on line 397 you can find memory_limit = 128M

change it, save it, and restart the services.