Last updated 13 August 2015. Created on 28 March 2009.
Edited by othermachines, abiyub, robokev, Francewhoa. Log in to edit this page.

When using Drupal your browser returns the following error

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@******.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

An "Internal Server Error" is an error on the web server that you're trying to access. That server is misconfigured in some way that is preventing it from responding properly to what you're asking for.

An "Internal Server Error" often occurs due to:

  • Misconfigured Drupal core file or folder read and write permissions.
  • Misconfigured web server file or folder read and write permissions.
  • Corrupted file(s).

To fix this click on one of the below possible causes.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

ralgh’s picture

I had a "500 Internal Server Error" error on a Rackspace Cloud Site (Mosso). I had to uncomment "RewriteBase /" in the .htaccess file to fix.

dadderley’s picture

I just updated a site on Rackspace Cloud Site (Mosso) and wrote over the original .htaccess file.
I set the darned thing up and forgot that I had customized the .htaccess for the rackspace environment.

I had a couple of of ugly moments there. Whew...

mam53’s picture

Hey, I also have the 500 error and uncomment the RewriteBase / it works fine.
Thanks

metakel’s picture

Removing the comment sign at "RewriteBase /" fixes my problem on migration of Drupal 7.9 too! Thank you!

leahtard’s picture

This fixed my Rackspace issues. Thanks!

Cheers, Leah

SaintKefka’s picture

I know you posted this comment over 3.5 years ago, but you just solved my problem with Rackspace. Thank you, thank you, thank you, thank you!

For anyone using Drupal 6 on Rackspace: The .htaccess file is hidden by default, so you'll need to force your FTP client to show it.

joekozak’s picture

Worked for me in awardspace
Thanks!

AlexBorsody’s picture

worked for me

hjimenez’s picture

I received a "500 Internal server error" which is solved by closing the string:
ErrorDocument 404 "The requested file favicon.ico was not found."
at line 22 in .htaccess. This error is also in version 6.17.

GlossyIbis’s picture

I can confirm this in 6.19 as well. Cheers.

GlossyIbis

T’s picture

Looks like this trailing quote at line 22 might have solved my problem with Drupal 6.20 and Apache 2.2 Thanks!!!

romantaran’s picture

I had to comment "Options -Multiviews" string.

saborit84’s picture

Hi,

I am building a site in Drupal 6 on Godaddy.com. I copied all the files in the root directory and imported my MySQL database. I also copied, pasted and renamed default.settings.php to settings.php. Then I went to the domain(tasks.capogroup.com) to complete my installation. Then when I try to log in with my administrator account(or with any other account) I got the 500 internal server error.
The part where I put the hostname, database name and database password went fine.

I am new with this technologies and I am having a hard time getting this ready. I will appreciate any help.

Thanks

felixd74’s picture

Hi,
I have the same problem, i'm trying for the past 2 days to install drupal and every time i'm getting a successful installation but when i'm clicking the "view your site" i'm presented with "http 500 internal server error" in IE or "The page cannot be displayed because an internal server error has occurred." in firefox. I did pu up this issue with my hosting company and their answer was:

"It looks like there is a PHP error somewhere inside of your application. Unfortunately as this is a Windows hosting package there are no error logs that could indicate where the problem is.

I would suggest you try using this:
https://support.blacknight.ie/index.php?_m=knowledgebase&_a=viewarticle&...
to try obtaining the errors that are causing this.

I would also suggest you check to make sure that all of your files have the correct file permissions (as this may also be causing it) and you can change the permissions of files on Windows using:
https://support.blacknight.ie/index.php?_m=knowledgebase&_a=viewarticle&..."

Probably i did about 6 or 7 fresh installs with no avail, so if anybody out there has a solution would be great to hear about it.
Regards:
Felix.

hokuspokus’s picture

I was having the same problems with GoDaddy as well, all sorts of installation problems with them. Didn't matter if I was building the site locally or on their server, always getting error messages. Tech support gave me the "we don't debug other people's code" response when I asked about the installation obstacles, so I just ended up going with a different host. After spending three days wrestling with it on GoDaddy for a client, I got my site up in 30 minutes on an alternate host. (FatCow) Not an endorsement of any other service, but GoDaddy definitely makes Drupal installs hard. Save your time and go with a company that supports Drupal out of the gate.

crazyant’s picture

I'm at the end of my rope here.

I've been going through all possible .htaccess fixes and made sure all the file permission are as intended, but no go.

So, the site seems to work just fine until I import the old database to the new host. It is after that I start getting those pesky 500 errors. The database dump is almost 17MB unpacked. Reckon that the hosting provider can't handle databases that big and it's timing out or something?

In a nutshell:
1) Download site files from old host, do a clean Drupal install on new host, upload old files -> A working site with no content, blocks, views, etc. (Themes work)
2) Download site files from old host, export MySQL database, upload files to new host, import database -> 500 error.

dinknaround’s picture

WAAHAAHAA! Me too, on Godaddy, after moving three D7 sites from individual hosting plans to one that allows hosting multiple sites under one plan. I think I just fixed it in the .htaccess file. Only needed to do this for for two of the sites where the domains actually point to sub-folders in the root:

In .htaccess:
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

So far things are working. I've never had problems with Godaddy before while using Drupal and didn't have to change any of the defaults in .htaccess or settings.php. But all of my sites were on their own hosting plans then. So I guess the plan you choose may make a difference. BTW, tech support at Godaddy really did try to help me out and spent time looking at my db, htaccess, and settings file. They're not all that bad. All of us just missed that one line.

bee_pipes’s picture

Thank-you for the above comment - it worked for me

My drupal 6.22 was installed locally to configure and test. Followed the procedure to move to 1and1.com:

- registered, created domains, etc.
- created database on hosting account
- exported local and imported into hosting site
- copied local installation to new host, altered settings.php to reference new sql dbf

The site showed the maintenance screen - i set it to main mode before making the move. I got into the site administrator account with the /?q=user bypass. It let me log in with the site admin account, but anything I clicked on would result in a white screen of death with the very uninformative massage about the 500 internal server error.

That brought me to this section. The domain points directly into the drupal directory, but had reached this point and was at a loss for anything to try that made sense. I have been going through this section and progressing through suggestions, no matter if they sounded like a longshot or not. Here are the variations of the suggestions I tried in this section:

# pkb-110819 - uncommented rewitebase and altered to refer to subdir on server
# - longshot on clearing up 500 internal server error
# pkb-110819 - aggravater the problem
# RewriteBase
# RewriteBase /website
# RewriteBase ./
# RewriteBase .
RewriteBase /

The last one was the winner.

Drupal.org rocks! Thanks for sharing your experiences. This is my first drupal site.

Regards

hitech3273’s picture

in my case this works good i just removed more "Hash" and it work like magic

# RewriteBase ./
# RewriteBase .
RewriteBase /

tekn328’s picture

I just spent half the day trying to figure this out on godaddy! Thank you so much! I should have looked on drupal.org sooner!

adriancotter’s picture

I just had this problem when upgrading modules in Drupal 7 (copying over module files by hand).

I would get a 500 error when I went to check the modules page. Also my website was blank and 500 errors were occurring in various places, although I could still get around the admin site a fair amount.

I randomly tried clearing cache, and it worked! The error went away.

neorg’s picture

I Got the Error 500 while I was uploading a *.po language file in /admin/build/translate/import

This was caused by the fcgid module in Apache2

How to fix
Edit /etc/apache2/mods-available/fcgid.conf

Add a line: MaxRequestLen 15728640
That's for 15Mb uploads.

Now your fcgid.conf file looks like this:

AddHandler fcgid-script .fcgi
FcgidConnectTimeout 20
MaxRequestLen 15728640

Now just restart apache.

apachectl graceful

There's always a little something left.

drvdt’s picture

I have the same error.
But it appears randomly. I don't update or install new modules/themes, but it still happens.

Anyone help me?

My sites: Medicare

czigor’s picture

To me this happned only on the Modules and Features pages and it was caused by enabling a webform block.

spyderpie’s picture

I am using Green Geeks ... Drupal 7 ...

In my case, the permissions were wrong and produce an error like this in the error log:

[Fri Dec 09 22:00:49 2011] [error] [client 24.238.43.61] SoftException in Application.cpp:431: Mismatch between target GID (501) and GID (6226) of file "/home/******/public_html/drupal/index.php"
[Fri Dec 09 21:52:20 2011] [error] [client 24.238.43.61] SoftException in Application.cpp:422: Mismatch between target UID (503) and UID (6226) of file "/home/*****/public_html/drupal/index.php"

Changing the permissions to reflect my accounts username as the user and group that 'chown's the files did the trick.

Peace,
Julie

mabho’s picture

Checking the error logs, I found I got the exactly same message as you did. Even the code was the same, the group associated with the new folders and files I have transfered to the server was this enigmatic 'number' (6266). Maybe I could go up one level and run

chown -R desired-user:desired-group public_html

But since I am extremely afraid of doing something stupid, as I am not a server admin, I decided to run the commands for each folder and file:

chown -R desired-user:desired-group themes
chown -R desired-user:desired-group scripts
chown -R desired-user:desired-group modules
chown -R desired-user:desired-group index.php
...

nevos’s picture

RewriteBase /
on .htaccess on 1and1 resolved this

DavidMichael2222’s picture

Tried everything here with no result.

increasing the max_execution_time in php.ini to 100 seconds did it.

Hope this helps someone.

christiahall’s picture

Thanks! That was it for me on a local dev environment using MAMP. I got the error when trying to create a feature using Features in Drupal 7.37

ericjenkins’s picture

Increasing the max_execution_time value in my php.ini file solved this issue for me, as well.

Ryan258’s picture

For anyone wondering, the .htaccess file you're looking for is located in the root of the Drupal folder.

So drupal12/

not

drupal12/sites/...

Hopefully this will save someone some extra time and chaos :)

Nekomusha’s picture

Thanks guys!! uncommenting the "RewriteBase /" worked for me to. HELL YEAH!!

frederico’s picture

I'm on Drupal 7 on GreenGeeks hosting using the Omega theme with the Glossy subtheme. I was getting this error when trying to edit a webpage. I disabled the Shortcode module and all the modules dependent on the Shortcode module. This cleared up the issue. ...now to try to figure out why this is happening and fix it.

Frederico Garza

hanspln’s picture

D6: I went through and disabled one by one module through the database and it was imagecache that caused the problem.

For those who don't know how: in the table system, set status to 0 instead of 1

worldon’s picture

Hi everybody!!

I've trying to fix a problem with my Drupal 7.15 with Access to blocks and modules.

I've triyed with:

1.- Rename htacces to phtacces

2.- Changing codes into web.config

3.- Changing codes in index.php

And don't works. I still searching the solution, but I don't have any idea of php...
Any suggestions please!!!

Thank's in advanced!!

If not... there are any possibilities to acces blocks by another way...???

Ace Cooper’s picture

I restored a backup of my D7 site to a subdomain and encountered the same problem.
The frontpage was displayed correctly, but all the internal pages gave me the pesky "500 Internal Server Error". Went into the .htaccess file, found the line "RewriteBase /", uncommented it and found all pages to be displayed correctly.
Thank you for this old thread, still usefull after all this time.

What we know shapes who we are.

simon fraser’s picture

just to add a thank you for keeping this thread going... an astonishingly easy yet effective cure for similar issue (April 2014 this time) after core update affected only one site with this error... (because it was the only one among several being updated with this issue it suggested the site had an abnormality elsewhere)...

life without these forums might be impossibly tricky!

Simon

SGhosh’s picture

Gid mismatch error:

In case, you had changed the permissions please restart apache and/or nginx for the permissions to take affect.

er.pushpinderrana’s picture

great thanks it works just by commenting RewriteBase / in .htaccess file kept at root.

flameproof’s picture

I moved Drupal 6.2 to a new server, newer PHP, MySQLand CentOS.

My site worked after changing .htaccess in the root directory from:

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

to:

# Don't show directory listings for URLs which map to a directory.
# Options -Indexes

# Follow symbolic links in this directory.
# Options +FollowSymLinks

Note this, RewriteBase is still commented!:
# RewriteBase /

Works fine now!

keshavsolanki’s picture

Hi I am working on my site http://www.touristsafari.com/. Its developed in Drupal 7. It was working fine for 3 months but now when i open any taxonomy term and click on edit link it takes too much time to open and also returns 500 or 503 error some time.

Any resolution for it?

manasiv’s picture

Did you check in the web server logs for any Apache or php errors? Also, check your website status at admin > reports > status report page. It may have findings which may lead you to fixing the error.

afireintheattic’s picture

This just happened to me as well, and it turns out it was a file/folder ownership problem, which drush does not account for. I ran 'drush up drupal' with the root user; however, the server was set up to need the specific user for that directory set to the owner. Running drush up with the root user had changed some key files/folders ownerships.

In my case, all owner/groups had been set to 'root', which caused the 500 error. In filezilla you can see the owner/group of each file/folder in the far right column. If these are set to root, you need to change them back to the correct owner -- I used ssh and did the following command on the drupal root folder for the site:

chown -R CORRECTUSER:CORRECTUSER DRUPALROOTFOLDER

Not sure if this is your issue, but hopefully it helps someone.

francescosciamanna’s picture

Additional comment is:
apache != correctuser
nobody != correctuser

So make sure that the ownership is set to the correct user!

cubeinspire’s picture

If you use a server with Apache 2.2 or above you need to modify the .htaccess replacing +FollowSymLinks with +SymLinksIfOwnerMatch
This is common on new server installations like Ubuntu 14.04 that comes with last versions of Apache2.

see: https://www.drupal.org/node/1269780

Swati Sharma’s picture

Getting 5xx Server Error while adding a new email address to my Drupal Account on drupal.org. ANybody faced the same before?

vlemqjsj’s picture

Drupal7.50 install 500 Error, because of htaccess file.

I solved it by comment line 145~149.

Before

# Add headers to all responses.
<IfModule mod_headers.c>
  # Disable content sniffing, since it's an attack vector.
  Header always set X-Content-Type-Options nosniff
</IfModule>

After

# Add headers to all responses.
#<IfModule mod_headers.c>
  # Disable content sniffing, since it's an attack vector.
#  Header always set X-Content-Type-Options nosniff
#</IfModule>
christiahall’s picture

Removing because this comment went to the wrong spot.

okjes’s picture

I have more or less the same problem right now.
After updating drupal to 7.51 it all still worked fine and I made some other changes, but when I installed a new module about phone tracking, the site went blank completely.
So I tried a lot of things, like re-installing drupal and searching here to find a fix.
What happens now is if I upload the original .htaccess file, the Internal Server Error shows up and after a refresh it goes blank again.

The server error log gives the following:

Options +FollowSymLinks replaced by Options +SymLinksIfOwnerMatch in /home/vhosts/mysite.com/httpdocs/.htaccess

This problem has been around for a while with a lot of posts on Drupal about it and apparantly, the server changes it automatically. But after the change, the website goes blank and there is no error and nothing in the error log about it.

I've already tried all the solutions in these comments and nothing works, so hopefully you guys can help me, because I don't know much about programming and such.

sillo’s picture

Increasing the memory limit solved the problem for me.

andrewyg’s picture

I just use the reinstall modules function provide by Devel and I got an error "over large size" like this and my site crushed into 500

M.Castro’s picture

I had a 500 when I went to the permissions page. What I had to do was increase the memory limit in the php.ini