Answers.Body: <p>I get this from time to time. I'm not sure of the specific errors in the logs as it hasn't happened for a while. But when it does then switching MAMP to use the same PHP for all hosts (so not FastCGI), load the site, then switch back to use FastCGI seems to magically "fix" it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-13T23:57:22.190Z
Answers.Text: Weird issue on MAMP Pro applying this fix the issue was solved, but if you have others apps on the same MAMP, need to switch every time.
Answers.UserDisplayName: Didierh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-07T09:02:15.173Z
Answers.LastActivityDate: 2018-03-07T09:02:15.173Z
Answers.UserDisplayName: foamcow
Answers.Body: <p>My solution is similar to @mohsin-mr's answer.  I disabled XDebug (MAMP Pro > PHP tab > uncheck Debugger) and the FastCGI errors went away.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-07T22:29:11.927Z
Answers.LastActivityDate: 2016-12-07T22:29:11.927Z
Answers.UserDisplayName: prieber
Answers.Body: <p>The reason of this problem vary on different situations. </p>
  
  <p>I recently installed/configured xdebug over MAMP and in template <em>php.ini</em> file as shown in snapshot <a href="https://i.sstatic.net/nn4Ap.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nn4Ap.png" alt="enter image description here"></a>, i wrote <code>zend_extension = /Applications/MAMP/bin/php/php5.5.26/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so</code> which is wrong because if we successfully install <code>xdebug</code> over loading MAMP, it automatically writes this line just after <code>[xdebug]</code> line; therefore on generating <em>php.ini</em>, it wrote the same line 2 times. 
  I removed my hard-coded line from <em>php.ini template file</em> and my issue was resolved.</p>
  
  <p>I hope it will help someone.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-21T04:15:25.040Z
Answers.LastActivityDate: 2016-05-21T04:15:25.040Z
Answers.UserDisplayName: Dimensional Sys
Answers.Body: <p>Following the answer in this issue <a href="https://stackoverflow.com/questions/15563217/apache2-fastcgi-comm-with-dynamic-server-aborted-first-read-idle-timeout/15565267#15565267">https://stackoverflow.com/questions/15563217/apache2-fastcgi-comm-with-dynamic-server-aborted-first-read-idle-timeout/15565267#15565267</a> I was able to successfully run my script without this dreaded timeout and 500 error, like so:</p>
  
  <ol>
  <li>Go to <code>File &gt; Edit Template &gt; Apache &gt; httpd.conf</code></li>
  <li>Do a Find &amp; Replace for <code>MAMP_FastCgiServer_MAMP</code></li>
  <li>Comment out the line <code>MAMP_FastCgiServer_MAMP</code></li>
  <li>Add a config line for your version of PHP, with the desired timeout limit at the end like so: <code>FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.2.fcgi -idle-timeout 3600</code></li>
  </ol>
  
  <p>For your version of PHP the code block would look like this, with the two changes being the second and third last lines:</p>
  
  <pre><code>&lt;IfModule mod_fastcgi.c&gt;
      # URIs that begin with /fcgi-bin/, are found in /var/www/fcgi-bin/
      Alias /fcgi-bin/ "/Applications/MAMP/fcgi-bin/"
  
      # Anything in here is handled as a "dynamic" server if not defined as "static" or "external"
      &lt;Directory "/Applications/MAMP/fcgi-bin/"&gt;
          SetHandler fastcgi-script
          Options +ExecCGI
      &lt;/Directory&gt;
  
      # Anything with one of these extensions is handled as a "dynamic" server if not defined as
      # "static" or "external". Note: "dynamic" servers require ExecCGI to be on in their directory.
      AddHandler fastcgi-script .fcgi .fpl
  
      MAMP_ActionPhpCgi_MAMP
  
      #MAMP_FastCgiServer_MAMP
      FastCgiServer /Applications/MAMP/fcgi-bin/php5.5.10.fcgi -idle-timeout 3600
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Also reference this solution:  <a href="https://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009">https://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-05T13:16:50.727Z
Answers.Text: **Thank you very much, pi_ron!** After trying to increase every possible memory and timeout in php and mysql settings, this finally helped!
Answers.UserDisplayName: Hannes Kirsman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T13:35:32.657Z
Answers.Text: Lifesaver. Such a random error. You saved me hours of troubleshooting. Thanks.
Answers.UserDisplayName: Ian Young
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-27T17:39:09.993Z
Answers.Text: Hi, 
  I have the same error but I have different php versions running (local MAMP Pro of course) for different sites. I solved the problem for a php7 local site by adding the following line
  `FastCgiServer /Applications/MAMP/fcgi-bin/php7.0.0.fcgi -idle-timeout 3600`
  But if I add a similar line for another version:
  `FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.10.fcgi -idle-timeout 3600`
  
  I cannot start the Apache server and the error log is also empty. I tried letting also different versions of php defined in there, but none of the others worked except for php7.
Answers.UserDisplayName: zarun
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-06T08:57:47.237Z
Answers.Text: Has anyone tried just adding `-idle-timeout 3600` to the end of the `MAMP_FastCgiServer_MAMP` line?
Answers.UserDisplayName: PaulSkinner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-25T06:21:16.817Z
Answers.Text: This was basically lifted from my answer for a similar question asked here:
  
  http://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009
  
  This amounts to plagiarism, and is not welcome on Stack Exchange. Remember to always add prominent attribution when using other sources. Thanks!
Answers.UserDisplayName: eballeste
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-30T05:51:08.860Z
Answers.Text: @eballeste I can't recall how I came to this answer last year, however I've added a reference to your solution as well.  I definitely have no interest in plagiarism for any kind of gain on Stack Exchange, and was only trying to share the solution I found for something that was very frustrating for me back when I used MAMP.
Answers.UserDisplayName: pi_ron
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-30T15:09:28.613Z
Answers.Text: it doesn't work on my MAMP PRO v 4.1.1
Answers.UserDisplayName: al404IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T00:55:27.587Z
Answers.Text: @Pi_ron Thank you so much you saved my time. It was a great solution for me for this problem. Thank you appreciate it.
Answers.UserDisplayName: sangham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-15T13:27:34.760Z
Answers.Text: Hi all, I had the same problem with the newest version of MAMP. For me, this was the solution: https://craftcms.stackexchange.com/a/21580/4775
Answers.UserDisplayName: Martijn La Feber
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-10T19:51:32.653Z
Answers.Text: Unfortunately, this no longer works in Mamp Pro 6.1.x. What worked for me was to delete the line `MAMP_FastCgiServer_MAMP` altogether and then add the specific php version timeout as listed above. If it's only commented out, there is an Apache error viewable in the Mamp Pro error log for Apache stating: `FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.2.33.fcgi"`
Answers.UserDisplayName: PWM
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-12T14:06:01.350Z
Answers.Text: This doesn't work on Mamp 6.3 it does actually but then you keep getting FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.2.33.fcgi sometimes, I searched around a lot and nothing useful was found so I added my own answer at: https://stackoverflow.com/a/74772164/10268067
Answers.UserDisplayName: Steve Moretz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-13T04:26:53.737Z
Answers.LastActivityDate: 2016-08-30T05:48:37.280Z
Answers.LastEditDate: 2017-05-23T12:38:53.957Z
Answers.UserDisplayName: pi_ron
Body: <p>I'm running across a problem developing a site locally using OS X 10.10 and MAMP Pro 3.0.5 with PHP 5.5.10. Accessing both the site front-end and the back-end admin interface is  throwing an error 500 Internal Server Error. </p>
  
  <p>The MAMP Apache log is showing multiple instances of the following error:</p>
  
  <pre><code>[Mon Nov 10 14:03:04 2014] [error] [client 127.0.0.1] FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php5.5.10.fcgi" aborted: idle timeout (30 sec), referer: http://jtp.dev:8888/admin/entries/project
  [Mon Nov 10 14:03:04 2014] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php5.5.10.fcgi", referer: http://jtp.dev:8888/admin/entries/project
  </code></pre>
  
  <p>Once this happens, I can't continue working until I restart my machine. Restarting my Mac and restarting MAMP fixes the error temporarily, but it eventually reappears and prevents me from being able to view the site locally.</p>
  
  <p>Has anyone got any ideas about what may be causing this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-10T15:07:50.303Z
Comments.Text: I see that somebody else once had this problem - see the third post down in the right hand column at https://plus.google.com/107199334932455999203/posts
Comments.UserDisplayName: Alex H
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-10T18:08:36.670Z
Comments.Text: Does this happen on long-running requests like updating, for example? Seems like it's some FastCGI timeout error.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-11T09:09:07.767Z
Comments.Text: No, it happens at random times, for instance it happened yesterday when attempting to view a particular field group.
Comments.UserDisplayName: Alex H
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-11T18:41:40.557Z
Comments.Text: Seems to be the same error with a potential resolution here: http://stackoverflow.com/a/15565267/684
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-17T17:07:32.790Z
Comments.Text: Not seeing this error anymore, but didn't do anything to fix it!
Comments.UserDisplayName: Alex H
Tags: <error-message>
Title: FastCGI error when accessing a local development site using MAMP Pro
ThreadText: # FastCGI error when accessing a local development site using MAMP Pro
  
  (Asked by: username_0 on 2014-11-10)
  
  I'm running across a problem developing a site locally using OS X 10.10 and MAMP Pro 3.0.5 with PHP 5.5.10. Accessing both the site front-end and the back-end admin interface is throwing an error 500 Internal Server Error.
  
  The MAMP Apache log is showing multiple instances of the following error:
  
  ```
  [Mon Nov 10 14:03:04 2014] [error] [client 127.0.0.1] FastCGI: comm with server "/Applications/MAMP/fcgi-bin/php5.5.10.fcgi" aborted: idle timeout (30 sec), referer: http://jtp.dev:8888/admin/entries/project
  [Mon Nov 10 14:03:04 2014] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php5.5.10.fcgi", referer: http://jtp.dev:8888/admin/entries/project
  
  ```
  
  Once this happens, I can't continue working until I restart my machine. Restarting my Mac and restarting MAMP fixes the error temporarily, but it eventually reappears and prevents me from being able to view the site locally.
  
  Has anyone got any ideas about what may be causing this?
  
  **Tags:** error-message
  
  > **Comments:**
  > **username_0**: I see that somebody else once had this problem - see the third post down in the right hand column at https://plus.google.com/107199334932455999203/posts  
  > **username_1**: Does this happen on long-running requests like updating, for example? Seems like it's some FastCGI timeout error.  
  > **username_0**: No, it happens at random times, for instance it happened yesterday when attempting to view a particular field group.  
  > **username_1**: Seems to be the same error with a potential resolution here: http://stackoverflow.com/a/15565267/684  
  > **username_0**: Not seeing this error anymore, but didn't do anything to fix it!  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_6 on 2015-01-13. Score: 26 | Accepted answer
  
  Following the answer in this issue <https://stackoverflow.com/questions/15563217/apache2-fastcgi-comm-with-dynamic-server-aborted-first-read-idle-timeout/15565267#15565267> I was able to successfully run my script without this dreaded timeout and 500 error, like so:
  
  1. Go to `File > Edit Template > Apache > httpd.conf`
  2. Do a Find & Replace for `MAMP_FastCgiServer_MAMP`
  3. Comment out the line `MAMP_FastCgiServer_MAMP`
  4. Add a config line for your version of PHP, with the desired timeout limit at the end like so: `FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.2.fcgi -idle-timeout 3600`
  
  For your version of PHP the code block would look like this, with the two changes being the second and third last lines:
  
  ```
  <IfModule mod_fastcgi.c>
      # URIs that begin with /fcgi-bin/, are found in /var/www/fcgi-bin/
      Alias /fcgi-bin/ "/Applications/MAMP/fcgi-bin/"
  
      # Anything in here is handled as a "dynamic" server if not defined as "static" or "external"
      <Directory "/Applications/MAMP/fcgi-bin/">
          SetHandler fastcgi-script
          Options +ExecCGI
      </Directory>
  
      # Anything with one of these extensions is handled as a "dynamic" server if not defined as
      # "static" or "external". Note: "dynamic" servers require ExecCGI to be on in their directory.
      AddHandler fastcgi-script .fcgi .fpl
  
      MAMP_ActionPhpCgi_MAMP
  
      #MAMP_FastCgiServer_MAMP
      FastCgiServer /Applications/MAMP/fcgi-bin/php5.5.10.fcgi -idle-timeout 3600
  </IfModule>
  
  ```
  
  Also reference this solution: <https://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009>
  
  > **Comments:**
  > **username_7**: **Thank you very much, username_6!** After trying to increase every possible memory and timeout in php and mysql settings, this finally helped!  
  > **username_8**: Lifesaver. Such a random error. You saved me hours of troubleshooting. Thanks.  
  > **username_9**: Hi,  I have the same error but I have different php versions running (local MAMP Pro of course) for different sites. I solved the problem for a php7 local site by adding the following line `FastCgiServer /Applications/MAMP/fcgi-bin/php7.0.0.fcgi -idle-timeout 3600` But if I add a similar line for another version: `FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.10.fcgi -idle-timeout 3600`  I cannot start the Apache server and the error log is also empty. I tried letting also different versions of php defined in there, but none of the others worked except for php7.  
  > **username_10**: Has anyone tried just adding `-idle-timeout 3600` to the end of the `MAMP_FastCgiServer_MAMP` line?  
  > **username_11**: This was basically lifted from my answer for a similar question asked here:  http://stackoverflow.com/questions/24715426/how-do-you-increase-the-apache-fastcgi-timeout-on-mamp-mamp-pro/24976009#24976009  This amounts to plagiarism, and is not welcome on Stack Exchange. Remember to always add prominent attribution when using other sources. Thanks!  
  > **username_6**: @username_11 I can't recall how I came to this answer last year, however I've added a reference to your solution as well.  I definitely have no interest in plagiarism for any kind of gain on Stack Exchange, and was only trying to share the solution I found for something that was very frustrating for me back when I used MAMP.  
  > **username_12**: it doesn't work on my MAMP PRO v 4.1.1  
  > **username_13**: @Pi_ron Thank you so much you saved my time. It was a great solution for me for this problem. Thank you appreciate it.  
  > **username_14**: Hi all, I had the same problem with the newest version of MAMP. For me, this was the solution: https://craftcms.stackexchange.com/a/21580/4775  
  > **username_15**: Unfortunately, this no longer works in Mamp Pro 6.1.x. What worked for me was to delete the line `MAMP_FastCgiServer_MAMP` altogether and then add the specific php version timeout as listed above. If it's only commented out, there is an Apache error viewable in the Mamp Pro error log for Apache stating: `FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.2.33.fcgi"`  
  > **username_16**: This doesn't work on Mamp 6.3 it does actually but then you keep getting FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.2.33.fcgi sometimes, I searched around a lot and nothing useful was found so I added my own answer at: https://stackoverflow.com/a/74772164/10268067  
  
  ---
  
  ### Answer by username_2 on 2018-03-07. Score: 2
  
  I get this from time to time. I'm not sure of the specific errors in the logs as it hasn't happened for a while. But when it does then switching MAMP to use the same PHP for all hosts (so not FastCGI), load the site, then switch back to use FastCGI seems to magically "fix" it.
  
  > **Comments:**
  > **username_3**: Weird issue on MAMP Pro applying this fix the issue was solved, but if you have others apps on the same MAMP, need to switch every time.  
  
  ---
  
  ### Answer by username_4 on 2016-12-07. Score: 1
  
  My solution is similar to @mohsin-mr's answer. I disabled XDebug (MAMP Pro > PHP tab > uncheck Debugger) and the FastCGI errors went away.
  
  
  ---
  
  ### Answer by username_5 on 2016-05-21. Score: 1
  
  The reason of this problem vary on different situations.
  
  I recently installed/configured xdebug over MAMP and in template *php.ini* file as shown in snapshot [![enter image description here](https://i.sstatic.net/nn4Ap.png)](https://i.sstatic.net/nn4Ap.png), i wrote `zend_extension = /Applications/MAMP/bin/php/php5.5.26/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so` which is wrong because if we successfully install `xdebug` over loading MAMP, it automatically writes this line just after `[xdebug]` line; therefore on generating *php.ini*, it wrote the same line 2 times.
  I removed my hard-coded line from *php.ini template file* and my issue was resolved.
  
  I hope it will help someone.
  
  
  ---
  
  