I get an internal server error installing drupal, after checking the forum I deleted the folowing lines.
No it works but I am not shure what function will maybe not work lather on?

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php



nathanwastaken’s picture

Can I ask what host you are using?

stoltoguzzi’s picture

stoltoguzzi’s picture

no idea about that?

amorgen’s picture

I have the same problem with my debian etch.
Commenting the lines above didn't solve the problem.
What could you advice me ?

stoltoguzzi’s picture

to check if it is the .htaccess, just rename or delete it, then you should be able to login.
I know this is not the solution but then you see if you realy have to dig in this direction.

munkle’s picture

I spent a while fiddling with .htaccess until I managed to get it working. Here's the one that worked for me in the end:

# Apache/PHP/Drupal settings:

# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
  Order deny,allow
  Deny from all

# Set some options.
##Options -Indexes
##Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
##<IfModule mod_php4.c>
##  php_value magic_quotes_gpc                0
##  php_value register_globals                0
##  php_value session.auto_start              0

# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
  ExpiresByType text/html A1

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the prefix www.
  # you can use one of the following settings to force user to use only one option:
  # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# $Id: .htaccess,v 1.73 2006/04/14 09:08:26 killes Exp $
flashy’s picture

This works well! Perfect. Could you please let me know if this has any side effects?

pineiden’s picture

Very well!!

Problem solved!

Note: copy the code and create the new .htaccess file

authentictech’s picture

I had the same problem when first installing Drupal and my ISP explained that "Options +FollowSymLinks" and "Options -Indexes" are applied already by default for security reasons.

I also tested each .htaccess variable setting by commenting/uncommenting them individually from the default Drupal version and found that only "Options +FollowSymLinks" and "Options -Indexes" and the following:

# PHP 4, Apache 1
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0

caused the error outlined in the original post.

These settings I commented out and left everything else as it was and it worked fine including "DirectoryIndex index.php". It is better to only remove settings that are actually causing errors.

cboshuizen’s picture

I followed what you did above, but I found that every single line caused a 500 Internal Server Error. So, after deleting such lines, I was left with an empty .htaccess file.

Certainly this happens often, as a search of the forums indicates. Is anyone able to offer a difinitive solution to the problem?


rimbeaux’s picture

I have running versions of Drupal on other servers. I just got an account on globat and now I can't get Drupal to work. I'm using 4.7.6

I commented out the .htaccess lines one at a time until the Internal Server Error no longer occurred, but now all I get is a blank page.

PHP 4.3.6
Apache 1.3.29
MySQL 4.0.18


rimbeaux’s picture

I deleted and reuploaded the drupal source, renamed the .htaccess file and it installed fine. So far. Blank Page probably means that some php code is messed up or missing.

mauryg’s picture

I am also on a Globat account and I am seeing the same problem.
Commenting out lines in .htaccess doesn;t help.
If I rename the .htaccess file then all I get is a blank page.
I went in and set the appropriate parameters in the sites/default/settings.php file for base URL and database login.
Same blank page.

hdemiranda’s picture

I had the same problem before I could do the installation.

Had to comment out the following:

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

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

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
####DirectoryIndex index.php

Drupal 5.1
GD library bundled (2.0.28 compatible)
MySQL database 4.1.15
PHP 5.2.1-0.dotdeb.1
Unicode library PHP Mbstring Extension
Web server Apache2.0.54 (Debian GNULinux) mod_ssl2.0.54 OpenSSL0.9.7e


Sutharsan’s picture

I encountered the same problem. Site hosted by one.com
Had to comment out the FollowSymLinks option. My .htaccess in the /files directory now looks like:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
#Options +FollowSymLinks

-- Sutha

-- Erik
Drupal trainer at Wizzlern

mauryg’s picture


You might want to look at my comment http://drupal.org/node/153335#comment-248459 regarding the .htaccess in the files directory. It stopped the downloading of images from that directory on my shared server on Globat till I inactivated the whole file.


xdonnelly’s picture

I originally had the same issue as everyone else, and I contected Globat support and explained my thoughts that the problem was with the .htaccess file included with the Drupal 5.1 installation. I copy and pasted the contents of the .htaccess file included with the Drupal install into the support ticket. This was the helpdesk response:

Thank you for contacting the Globat Signature Support.

Some apache commands are no longer supported in .htaccess or .htconfig due to security concerns:


I noticed that your are using options and errordocument in the .htaccess. This is the reason the error message appears.

I commented out all the rules with "Options" and "ErrorDocument" and then started the installation over again (new MySQL database and new settings.php file). This time the installation screen actually cam up when I loaded the site and I was able to enter the database configuration info.

Now that I have the site installed, it appears to be running VERY slowly. I haven't set anything but the default installation up yet. Has anyone else had extremely slow website performance with Drupal on a Globat hosting account?

mauryg’s picture

YES, I am also experiencing very slow page load times on my Globat hosted installation.
I just installed the Devel module to do some timings and see what SQL queries are the slowest or repeated.
I haven't played with the caching yet, but that may be a way to improve response, especially for pages with multiple boxes in the side columns which are reloaded everytime you access a page.

As far as site performance is concerned, you might also look at http://drupal.org/node/137898


swordbreaker’s picture

Just want to add my experience with this problem, seeing as a lot of people are having the same issue.

I have several sites, all running on the latest version of Drupal. Suddenly one day, one of them started getting 500 Internal Server Errors, and the error logs only shows Premature end of script headers: /home/myaccount/public_html/mysite.com/index.php

After moving to DreamHost, I encountered the same problem. Later I found it this problem only happens with PHP5 enabled. When running on PHP4, the site runs fine, but switching to PHP5 causes an internal server error. I know this wasn't caused by any modules, since I tried disabling every single module/themes, and was getting the same result.

A few days ago I switched to a new host, and encountered the same problem (the host was running PHP5). So I contacted support, and the support was nice enough to actually help me solve this instead of brushing it off as a "Drupal issue".

Apparently the following lines in my .htaccess file was causing the problem:

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0

So what the support ended doing was commenting out those lines and creating a custom php.ini file:

magic_quotes_gpc                0
register_globals                0
session.auto_start              0
mbstring.http_input             pass
mbstring.http_output            pass
mbstring.encoding_translation   0

Which solved the problem.

According to the support, apparently it's not a Drupal problem, since my server run PHP as CGI and therefore, it does not take the PHP modifications done through .htaccess, so creating a php.ini just for that site's folder solved it. Quoting the person: "the way that the default drupal configuration try to change the PHP environment, they try to do it through .htaccess when in this servers running php as cgi have to be done through php.ini".

However it seems this was only able to work because the host run PHP as CGI, and not as an Apache module.

Another thing is, my other sites running on Drupal and PHP5 seems to work fine, and it doesn't seem to be cause by any modules.

I'm no expert at this, so I don't know what "exactly" is causing the error, but I hope this will help someone, or provide some helpful info to someone who knows much more about Drupal/PHP to solve this problem :P

horst_wessel’s picture

I host my web in my own server, i want to migrate my CMS from wordpress to drupal, after i delete all wordpress files and installing drupal. I have the same problem.

FYI, i use freebsd for my server and i host two web site there. can you help?? I'm still newbie here.

AntSEO’s picture

I removed my htaccess file to see if the site would break for testing, then put the file back but get these symbols..

How do I resolve this problem?


Guus_’s picture

I've found a way to make Drupal work with XAMMP for OSX. (10.5)
edit the httpd.conf. in xampp/etc/ explained in the link below. Don't forget to restart Xampp!

thanks to this post:


killerloop’s picture

pineiden’s picture

I reconfigred the .htaccess and this code didn't work:

# Protect files and directories from prying eyes.
#<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|(my)?sq$
#Order allow,deny
#Deny from all

RewriteBase /

#comandos que no funcionan
#Order allow, deny
#Options -Indexes

srece’s picture

Brought down my site editing the .htaccess file even restored the backup and still couldn't get site up, went on a bunch of different forums for .htaccess problems, tried commenting out, commenting in lines in .htaccess nothing worked. So this is what I did.

Actually just did a mock reinstall of drupal 6.0 and it worked. (Backup your site first and the SQL database files!)

went into the www/sites folder and added a folder called mysite.com (just use the same name as your site) and placed a new settings.php file in there gave write permission and then you put open install.php in a browser or mysite.com/install.php

Go to settings.php and edit your file and place your host info into line 92 or
$db_url = 'mysql://username:password@localhost/databasename';

and then go to mysite.com/install.php and enter in all data to install username pass, localhost etc...

Click to install and it will come up and say site is already installed see existing site and this worked for my site came right up.

swara15’s picture

First tried by editing .htaccess file to remove comment from RewriteBase /. But its not worked for me.

Then setting memory limit double to the existing one given success.

fabrizior’s picture

Same problem.
My configuration is Suse Linux Enterprise Server 12 SP2, Apache/2.4.23.
I've modified .htaccess in order to solve the issue, replacing
Order allow,deny with Require all granted at line 7 of original .htaccess.
I think this problem is because newer version of apache has a new directive: Require.

At https://httpd.apache.org/docs/2.4/upgrading.html is reported:

Mixing old and new directives

Mixing old directives like Order, Allow or Deny with new ones like Require is technically possible but discouraged. mod_access_compat was created to support configurations containing only old directives to facilitate the 2.4 upgrade. Please check the examples below to get a better idea about issues that might arise.