Error 500 - Internal server error (1and1 hosting)

dynamicclothing - March 11, 2008 - 12:46

Hello,

For some reason last week when I tried to login to my admin I was prompted with this message:

"Error 500 - Internal server error
An internal server error has occured!
Please try again later."

Has anyone else come across this issue with 1and1 hosting? If so I tried to read some other forums and say that some ppl deleted their .htaccess file. Would this help? If so could it cause any problems.

Any help or suggestion would be great!

Thanks,

Sean
www.dynamicclothing.net (site in question)

Deleteing the .htaccess file

pcs305 - March 11, 2008 - 14:38

Deleteing the .htaccess file is not the solution.

The first thing to try is to change RewriteBase statement in you .htaccess file.
#RewriteBase /drupal change to RewriteBase /

Here is a thread where this problem was hashed out and resolved.
http://drupal.org/node/187501

Hope it helps.

Thanks for the help!

dynamicclothing - March 11, 2008 - 15:38

Thank you for the help on the suggestion I followed the link at the bottom of your post and at the bottom of that the solutions was there!!!

Put this in your .htaccess file:

"AddType x-mapp-php5 .php"

and ur done!

Thanks for the help :)

This was the solution for me

dan.crouthamel - April 27, 2008 - 17:39

This was the solution for me as well. If you are using 1and1 (Linux package), it will use PHP 4 by default. Adding the line above to your .htaccess file will tell Apache to use PHP 5.

Me too

andywang - April 30, 2008 - 16:11

I'm also using 1and1 (linux hosting package), and adding this line got rid of the 500 Server Error messages when enabling certain modules such as "Views".

Thanks!
Andrew

Got it!!!

swiftarrow - May 12, 2008 - 10:16

I just wrote in that I hadnt' gotten it... but between submitting it to preview, and getting the page back, it's fixed!!!!

My problems were solved by:

  • Adding at top of .htaccess:
    AddType x-mapp-php5 .php
  • Changing:
      RewriteEngine on
    to:
      RewriteEngine ON
  • I have Drupal in a subdirectory, so I did this:
    RewriteBase /drupal57
  • Everything else inside the rewrite section is commented out except:
      # 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]

And that did it!!

I'm using 1&1's Basic Linux Package.

Good luck!!

thanks for posting this! i

YesCT - May 15, 2008 - 12:46

thanks for posting this! i just had to do this too!

Cathy Theys
YesTrainingAndEducation.com

I began getting this error after attempted install of CCK Module

kjv1611 - August 28, 2008 - 02:37

I began getting this error after attempted install of CCK Module.

I then found this forum posting from this site:
http://pedroposada.com/blog/error-500-internal-server-error-1and1-hostin...

And tried everything I've seen in here...

Well, except for this portion:

RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

Any thoughts? Do I need to do that? If so, what exactly does all that do?

I'm using 1&1 Home Package
Using Drupal 6.4, and tried both the "stable" current download for 6.x, and later tried the dev download AFTER I had already gotten this error message.

I am only getting the error when attempting to view/edit modules. Everwhere else so far seems fine, though I've not tried but a couple other pages.

I just started using this drupal stuff last Saturday. Any help would be appreciated. If you give me any instructions, please assume I know absolutely nothing (if you don't mind). :0)

Got it again after attemped install of FCKeditor module

kjv1611 - August 28, 2008 - 11:11

Got it again after attemped install of FCKeditor module.
Got rid of message again by deleting FCKeditor folder.

I think fixed - I had accidentally renamed the .htaccess file

kjv1611 - August 28, 2008 - 17:49

I think fixed - I had accidentally renamed the .htaccess file to htaccess

Glad you fixed it!

swiftarrow - September 19, 2008 - 13:33

yes... that can cause some problems. I have to name it htaccess on my system, upload it and then rename it adding the dot.
Not just once have I been tearing my hair out because it has not been working!

Exactly my problem...

gjperera - October 20, 2008 - 16:05

I'm glad I ran into this solution, it's been bugging me for a while, will try when I got home this afternoon!

Visit http://www.gilsmethod.com for the latest computer tutorials.

IT WORKED!

gjperera - October 20, 2008 - 20:30

The only thing is that I needed to increase the memory size in the PHP.ini file.
Thanks to everyone who posted all these solutions!

Visit http://www.gilsmethod.com for the latest computer tutorials.

Nice site

kjv1611 - October 21, 2008 - 17:40

BTW, I didn't look at it much yet, but just now glanced. The site you link to in your posts looks pretty neat so far. It's a great idea - something I've wanted to turn at least part of my site idea into (personal site - not church, of course), but just haven't gotten around to. If anything, it'll provide an example for me to look at! I'll have to bookmark it and look at it more later. :0)

Thanks

ˇh2nk - January 24, 2010 - 09:56

Your soulution works well.
Thanks

I cannot solve it!!

rperezGBT - November 24, 2008 - 09:50

hello, my error 500 comes out when i try to access site building-modules menu...I have inserted the line "AddType x-mapp-php5 .php " on top of the .htaccess file and nothing.

I am also using 1&1 hosting.

here is my .htacess file in case someone can help me...i'm quite desperated.

Thanks!

#
# Apache/PHP/Drupal settings:
#

#added by rod
AddType x-mapp-php5 .php
php_value memory_limit 64M


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

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

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# 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
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# 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
</IfModule>

# 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
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

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

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
    RewriteBase /drupal-6.6
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $

------------------------------------------------------------
Rodrigo Pérez Rodríguez

Grupo de Bioingeniería y Telemedicina
Universidad Politécnica de Madrid
------------------------------------------------------------

Any hints of what causing in your log files?

kjv1611 - November 25, 2008 - 20:52

Any hints of what causing in your log files?

Log files at:
http://yourwebsite.domain/admin/reports/status

You can also access the actual log file(s) somewhere within the Drupal installation as text files, but I can't remember where off the top of my head.

Also, are you sure there are no updates that needed to take place that haven't?

And are you using a default theme to get to the admin settings, or are you using a custom theme. If custom, see if you can change to a default theme, such as Garland, and then see if it works correctly.

Poor php4 performance at 1and1 may be causing script timeouts

plato1123 - March 27, 2009 - 01:12

I think this problem is partially caused by poor php performance on 1and1 hosting. I notice that sometimes I can't get into the modules page, but if I hold down f5 in firefox on the 500 error page for a few seconds and then release, it loads almost every time. I get the feeling that something times out after 5 seconds under their default php4 configuration. Either their php5 server is faster or has a longer time-out.

This worked for me

mrivitt - May 20, 2009 - 09:34

I had a similar problem that when ever I added a new module, I would get a 500 internal server error when trying to access the access control page (only the access control link, I could access permissions via roles). The site in question is hosted by 1and1, so I added the 'AddType x-mapp-php5 .php' line to the .htaccess file and all worked fine.

 
 

Drupal is a registered trademark of Dries Buytaert.