When I enable this module and am logged out, I get 500 internal server error. Error log: Premature end of script headers: index.php

When I disable this module, all is fine.

Comments

das-peter’s picture

Status: Active » Postponed (maintainer needs more info)

Please provided detail information:

  • Drupal version
  • Enabled modules and their versions
  • Used theme and its version
  • Cache settings admin/config/development/performance
    • Are caches enabled
    • Is the JavaScript or CSS aggregation enabled
  • Operation system and its version
  • Used browser
    • Version
    • Operation system and its version
    • Script error messages or console output

It's always a good idea to do complete cache flush: drush cc all or use admin/config/development/performance

kubilayrd’s picture

Hi,

After setting the memory_limit to 128M in settings.php file and clearing all the caches, I could get rid of this very same issue.

In the settings.php file, inserted this line:
ini_set('memory_limit', '128M');

Source Link

das-peter’s picture

@kubilayrd Thanks for the information!

bensnyder’s picture

going from 2.x to 3.0-beta1, the upgrade process went fine for me. However, several of my nodes that use media fields were getting HTTP 500 (WSOD) if accessed by an anonymous user. Logged in users could see the page, no prob.

I was getting "[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log

D7.22, caches fully flushed and I debugged for about 2 hours.

das-peter’s picture

@bensnyder did you try the suggestion in #2

bensnyder’s picture

Not in settings.php but in my php.ini I have 512mb allocated

das-peter’s picture

@bensnyder Well, I doesn't matter where it is defined as long as it's set. Btw. did you set the limit to a ridiculous amount to test with, e.g. 2GB?

However, several of my nodes that use media fields were getting HTTP 500 (WSOD) if accessed by an anonymous user. Logged in users could see the page, no prob.

Actually that sounds more like an issue with the media or file module itself since MBP doesn't affect the output of media/file/image fields.

gintaras.r’s picture

This also just started happening to me and hopefully the extra info I'm throwing in here will help with this issue. All this is on a test server I set up on my home computer:
- Windows 7 x64; Apache 2.4; MySQL 5.6; PHP 5.4.17
- Drupal 7.22 (with patch 1525176-fix_entity_conditions-D7)
- Built using Spark profile spark-7.x-1.0-alpha9-no-core
- Installed modules: plenty (let me know if you really ned the whole list), but probably the most relevant ones are: file_entity-7.x-2.0-alpha2, media-7.x-2.0-alpha2, media_browser_plus-7.x-3.0-beta1
- Building my own subtheme of AdaptiveTheme (adaptivetheme-7.x-3.1). At this point only css and config changes (ie, no code changes).
- Mostly on Firefox 23.0.1, but tried also on IE10 with similar results

A few days ago i started getting 500 Internal server error (after a long load time) for any and every site URL, and at the time had no idea what could have caused it. Had no luck isolating it via Eclipse/xdebug. Eventually I came across a suggestion to increase memory limit in php.ini. Increased from 128 to 256MB.

Result was the site bombed out with this call stack trace displayed, which to me looks like a smoking gun pointing at MBPlus:

( ! ) Fatal error: Maximum function nesting level of '100' reached, aborting! in E:\Workbench\Web Projects\belyssa\dev-local.belyssa.com\includes\module.inc on line 727
Call Stack
#	Time	Memory	Function	Location
1	0.0020	133920	{main}( )	..\index.php:0
2	4.6493	18150384	menu_execute_active_handler( )	..\index.php:21
3	4.9013	19560576	drupal_deliver_page( )	..\menu.inc:532
4	4.9013	19560896	drupal_deliver_html_page( )	..\common.inc:2560
5	4.9013	19561856	drupal_render_page( )	..\common.inc:2672
6	4.9463	19757968	block_page_build( )	..\common.inc:5721
7	4.9463	19760624	block_get_blocks_by_region( )	..\block.module:268
8	4.9463	19760720	block_list( )	..\block.module:318
9	4.9523	19773936	_block_render_blocks( )	..\block.module:674
10	4.9523	19776000	module_invoke( )	..\block.module:854
11	4.9523	19776320	call_user_func_array ( )	..\module.inc:833
12	4.9523	19776504	system_block_view( )	..\module.inc:833
13	4.9523	19777280	menu_tree( )	..\system.module:2094
14	4.9523	19777576	menu_tree_page_data( )	..\menu.inc:996
15	5.0093	19780064	menu_build_tree( )	..\menu.inc:1318
16	5.0113	19834008	menu_tree_check_access( )	..\menu.inc:1355
17	5.0113	19834080	_menu_tree_check_access( )	..\menu.inc:1502
18	5.0173	19861936	_menu_link_translate( )	..\menu.inc:1512
19	5.0173	19862536	_menu_check_access( )	..\menu.inc:927
20	5.0173	19862936	call_user_func_array ( )	..\menu.inc:637
21	5.0173	19863120	file_entity_access( )	..\menu.inc:637
22	5.0173	19863760	module_invoke_all( )	..\file_entity.module:1641
23	5.0433	19903744	call_user_func_array ( )	..\module.inc:857
24	5.0433	19904032	media_browser_plus_file_entity_access( )	..\module.inc:857
25	5.0433	19904056	file_entity_access( )	..\media_browser_plus.module:338
26	5.0433	19904120	module_invoke_all( )	..\file_entity.module:1641
27	5.0443	19905080	call_user_func_array ( )	..\module.inc:857
28	5.0443	19905368	media_browser_plus_file_entity_access( )	..\module.inc:857
29	5.0443	19905368	file_entity_access( )	..\media_browser_plus.module:338
30	5.0443	19905432	module_invoke_all( )	..\file_entity.module:1641
31	5.0453	19906368	call_user_func_array ( )	..\module.inc:857
32	5.0453	19906656	media_browser_plus_file_entity_access( )	..\module.inc:857
33	5.0453	19906656	file_entity_access( )	..\media_browser_plus.module:338
34	5.0453	19906720	module_invoke_all( )	..\file_entity.module:1641
35	5.0463	19907656	call_user_func_array ( )	..\module.inc:857
36	5.0463	19907944	media_browser_plus_file_entity_access( )	..\module.inc:857

It goes on, but you get the picture. Infinite loop. If not for the 100 nest limit, would have been a 500 error again.

Some extra info that might be relevant:
- The site only has one page (which appears as the front page). This page has two videos embedded inline via Media Embed ckeditor button (which brings up a modal textarea dialog - was a little surprised to not get a MBP window).
- It appears the original poster is correct, in that it only bums out for unauthenticated users, though it may be worth testing for authenticated users without permissions to edit the content.
- Only a few weeks ago I was using file_entity-7.x-2.0-unstable7 and media-7.x-2.0-unstable7, without these issues. That might not mean anything though, as I hadn't embedded any media prior to the upgrade. I also may not have ever logged out (ie, i didn't browse the site as anonymous until a few days ago).

Hopefully this can be fixed and MBP made better and stronger!
-

das-peter’s picture

Interestingly I don't even have the function media_browser_plus_file_entity_access() in the latest MBP-dev version. However there's media_browser_plus_file_entity_access_wrapper() instead.
Thus I'd suggest to update MBP to the latest dev version.
Please let me know if this fixes the issue.

gintaras.r’s picture

Looks like that did the trick, at least in my case. Under the circumstances that I was getting the error before, now working as expected. If only everything in life was that easy!
You may want to add a note on the module page, as first instinct is to go for the non-dev version. Thanks for the quick response.

das-peter’s picture

@gintaras.r: Release 7.x-3.x-beta2 (https://drupal.org/node/2088133) should be available soon.

das-peter’s picture

Status: Postponed (maintainer needs more info) » Fixed

As of the feedback from #10 I'd say the cause is found and the issue is fixed - in the latest dev / beta of 7.x-.-3.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.