I have recently upgraded to MAMP PRO 2 and to my surprise some of the sites I was working with started showing a blank page locally even though the online version is working fine. After spending some hours in research, I have found the solution. It was basically because of the PHP memory limit.
If you add the following code in your index.php file , it will show the error OR you could open MAMP PRO >>log>>Apache and check the logs. I got the following error
Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /Applications/MAMP/htdocs/testsite/sites/all/modules/views/plugins/views_plugin_display.inc on line 843
You can solve the problem by doing the following steps
- Start MAMP PRO
- Stop the server if it’s running
- Goto Menu -> File -> Edit Template -> PHP5 php.ini
- The PHP ini file will be opened.
- If a dialogue box pops up, read it and confirm with OK
- Search (Command-F) for “memory_limit” (without quotes)
- You should get the following line:
memory_limit = 8M ; Maximum amount of memory a script may consume (8M)
- Now you can change the default value of 8M. For instance. into 32M or even more (like 128M)
- Save (Command-S) your changes.
- Close (Command-W) the file.
- Start the Server.
Now you should be able to see your page. Good Luck with your Drupal development!!