Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Setting up a Local Developmen... > Time for action — changing the defau...

Time for action — changing the default configuration for MAMP

  1. Launch MAMP Pro.

  2. Go to File | Edit Template | PHP | 5.3.6 (your version may be different. It's the 5.3 that's the important part, not the last number):

  3. On the left-hand side of the text editor are line numbers. Around line 230, you'll find three lines: max_execution_time, max_input_time, and memory_limit. Change their values as follows:

    max_execution_time = 999;
    max_input_time = 999;
    memory_limit = 256M;
    
  4. Save and close the file after altering the values.

  5. Go to File | Edit Template | MySQL my.cnf.

  6. As shown in the preceding screenshot, raise the max_allowed_packet size to 32M, raise the net_buffer_length, read_buffer_size, and read_rnd_buffer_size each to 2048K. Save and close the file.

  7. Using the red button at the top right of the MAMP window, stop and start the server's services.

  8. Navigate again to http://dpk.local/info.php. Look for the memory_limit value on the page. It should be the same as the value you set in step 3, 256M.

What just happened?

The default settings for MySQL and PHP are a bit on the conservative side. We changed some of the defaults to allow Drupal some more memory to play in and gave MySQL some more cache for it to communicate with PHP more efficiently. We then restarted the server to see our settings take effect.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial