Is there any reason why clicking the "Clear Cache" button would cause a "500 Internal Server Error"? All I did was click that button, and now the whole site is down. If I knew what the logical connection between clearing the cache and destroying the site, I may be able to fix it.

Does anyone know how it may have happened? I could really use some clues right now!

Comments

Ayesh’s picture

Hitting the "clear cache" is the onlything you did? Sometimes, if you delete .htaccess files, this error comes.
Temporary remove all htaccess modifications and try to clear cache using php.
Create a file called clear.php and put following in it. then, call it in browser.

<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
?>

but I'm not sure if it will work.

polyglottally’s picture

I swear! That's all I did! I hit the clear cache button, and then poof! It all went down. I've tried a custom error-trapping page through web.config, but that yielded nothing.

I tried what you suggested, and I got the following:

Notice: Use of undefined constant DRUPAL_ROOT - assumed 'DRUPAL_ROOT' in D:\Hosting\7------\html\includes\bootstrap.inc on line 2094

Warning: require_once(DRUPAL_ROOT/includes/errors.inc) [function.require-once]: failed to open stream: No such file or directory in D:\Hosting\7------\html\includes\bootstrap.inc on line 2094

Fatal error: require_once() [function.require]: Failed opening required 'DRUPAL_ROOT/includes/errors.inc' (include_path='.;C:\php5\pear') in D:\Hosting\7------\html\includes\bootstrap.inc on line 2094

Uh oh.

Ayesh’s picture

Put file in public_html folder(public root) and run file. Sorry for not saying that.

polyglottally’s picture

@Ayesh: Thanks for that. Unfortunately, still not working.

Back to my original question: What could the "clear cache" button possibly have done to cause this? I'm afraid that there is now something residual in the database causing fatal errors. Or is it uncovering a flaw in the Drupal install? I really hope it's not the database, I don't want to lose the hundreds of postings...

Ayesh’s picture

I suspect that drupal did not flush cache correctly. In most cases, http 500 error comes because of htaccess misconfiguration. In cache folders, Drupal places a small htaceess file and in most cases deleting it do not break the site.
The reason why I ask you to force cache clearance is, then Drupal can forget about cache and generate new ones.

Backup site first and delete cache folder(/sites/files/css, js, ctools, etc) and try again.

kssundar’s picture

You can rebuild the cache by executing these codes:
module_rebuild_cache();
drupal_rebuild_theme_registry();
node_types_rebuild();
menu_rebuild();

Regards,
Sundar

Andy B’s picture

This sort of thing tends to be a large problem when moving websites from server to server, and platform to platform (Linux to Windows and back again). What should happen, is that Drupal should have a rebuild cache button in the performance tab. Say, next to the clear cache button. When I clear the cache, I get the same internal server error problem.

qqboy’s picture