What to do when Drupal gives you nothing but a HTTP 500 Internal Server Error

 

http500
Give me back my website!!!!

You have no UI whatsoever to your Drupal, no admin page and no idea what this vague error means. What do you do?

Better question is probably what you DID do.
Now I’m very new (less than 24 hours at the time of writing) to Drupal so I don’t pretend to be an expert. But I want to share how I fixed my problem.
I know what I did do- changed themes incessantly and not following instructions.. so i went ahead and searched for solutions to changing the theme manually as in without having to go through the administration dashboard. I soon found out that I could issue sql commands to make changes to my database (which didn’t work for me for a number of reasons) and that my google searching skills needs to level up because the solution has been posted elsewhere but I just couldn’t find it at the time.
What I did wrong was to install a theme that has a prerequisite of installing the core theme…and not installing said prerequisite. So the solution would simply be to install AND enable this core theme and it’ll all be ok.

but of course, I had no UI.

I was ready to delete the whole thing since it was just a test to begin with but decided to try to re-run the installation just to see what happens. So I ran /drupal/install.php (instead of index.php, same thing). It says it’s already installed blahblahblah. So I picked update script and it threw me a few errors along the lines of:

“Notice: site:drupal.org Trying to get property of non-object in drupal_alter() (line 996 of /drupal/includes/module.inc)”

Nothing I could do about it, Clicked “rebuild permissions” out of desperation because the only other clickable link was asking me to “try again” after having resolved the above errors.

installphp

doesn’t show said error here because I didn’t take screenshots at the time

rebuildpermissions

And voila. Clicking rebuild permissions brought back the Admin bar where I could access the Themes page and consequently fix everything by switching themes.

Here’s something worth trying instead of going through install.php- add “?q=admin” to your drupal site’s url like so:

http://yoursite.com/drupal/?q=admin

Related Posts