I've been trying to increase the php memory_limit in MAMP (Mac OSX). The version of PHP I'm using is 5.4.1.0. I've read about creating a new template for MAMP Pro, but I'm using the standard version of MAMP.
I've tried all of the below, but nothing seems to have worked. Any help would be much appreciated.
Thank you for your time.
php_value memory_limit 128M
I've changed the following from 32M to 128M in the following file:
/Applications/MAMP/conf/php5.4.10
memory_limit = 128M
;
I then quit MAMP entirely and restarted it, but in MAMP phpInfo it still reads:
memory_limit 32M
Virtual Hosts
I am using Virtual Hosts to set my own URLs. I read somewhere that it may be necessary to increase the memory limit here. So I added this to the 'php_value memory_limit 128M':
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot /Applications/MAMP/htdocs
ServerName localhost
php_value memory_limit 128M
</VirtualHost>
and lower down in the same file in the relevant site's configuration:
<VirtualHost *:80>
DocumentRoot "/Users/Username/Dropbox/Dev/sitename.dev"
ServerName sitename.dev
php_value memory_limit 128M
</VirtualHost>
(By the way, I keep my MAMP folder (Dev) in Dropbox and it works fine)
php.ini
I also added a php.ini file with the following contents in both the root of my site directory and the root of my MAMP directory:
memory_limit = 128M
Managed to solve it ;-)
The correct one is:
/Applications/MAMP/bin/php/php[your_php_version]/conf/php.ini
find 'memory_limit' and increase the number:
memory_limit = [number]M
Thanks!