6

Everything works except the /node/[nr]/edit page of only one content type page. And it's not for every page of this specific content type. Only one.

So let's say I have a content type "product" and created 5 nodes with that content type. Editing 4 of them works but for one the error 500 Premature end of script headers: index.php occurs.

I tried increasing the memory limit in the php.ini all the way up to memory_limit = 1024M (and restarted apache after that) but this changes nothing. Btw I'm using Acquia DevDesktop and the PHP version is 7.0.15. I also tried downgrading the PHP version (and there also increased the memory limit) but this won't do anything either.

Please help me, I'm incredibly thankful for every answer I can get!

4
  • If this is only happening for one node, my guess would be that the content of this node causes a recursion and you run out of memory.
    – 4k4
    Dec 8 '17 at 14:16
  • Hm no, it doesn't seem to do that.
    – elterr1ble
    Dec 9 '17 at 16:09
  • 1
    @elterr1ble were you able to find the solutions, I'm having same issue with my site as well. Jun 4 '18 at 7:21
  • @SukhjinderSingh see Nookeen's answer below. This did it for me!
    – elterr1ble
    Nov 28 '18 at 12:09
5

This is not "solve it all" answer, but it may help those who use Acquia. The problem went away after switching from Fast CGI (mod_fcgid) to Apache module (mod_php) in Acquia DevDesktop->Preferences->Config.

Just some env notes for future debugging:
Acquia DevDesktop 2 rev:39801a8
PHP version 7.2.9

0
20

@mcaleaa answer helped me on an acquia based site. To fix it I commented out the following lines in development.services.yml.

parameters:
  http.response.debug_cacheability_headers: true
0
6

In case this helps anyone: I encountered this error on my local site's front page, just after following the instructions here https://www.drupal.org/node/2598914 (Disable Drupal 8 caching during development)

When I once again commented out this line in my settings.local.php, the 500 error went away:

# $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';

I suspect that my site's front page is heavily dependent on the cache entries, and when I switch to the null cache, the page is simply having trouble getting built. That's my guess.

1
  • This was not the case in my case, so hope for more answers.
    – Nookeen
    Oct 29 '18 at 22:24
0

I am using drupalVm and was able to make the switch to using nginx. This was helpful for us cause our site is hosted by pantheon which uses nginx. You'll need these values set in your extra parameters: fastcgi_buffers and fastcgi_buffer_size. My config.yml looks like this:

drupalvm_webserver: nginx
...
nginx_hosts:
  - server_name: "{{ drupal_domain }} www.{{ drupal_domain }}"
  ...
  extra_parameters: |
    ...
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
0

In my case, SVG files in my blocks are causing the error. The error went away after replacing them.

1
  • Can you please provide a little bit more detail how these SVG got placed there, how you removed them and what these SVG looked like?
    – leymannx
    Apr 6 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.