Hello.
The website works fine on the localhost. I Ziped the site, moved it to 1And1 Server (inside Sub directory if that matters), changed the settings.php (only things that are left black are: 'port' => '', and 'prefix' => '',). Home page is working but when I go to any other page I get the Internal server error. A 500 Internal Server Error.
Things to Know:
*Ziped the site when migrating.
*I have other sites on 1 and 1 and they are working fine.
*The only difference about the site with the 500 error is that "Zen" theme is installed and is being used.
*Called 1 and 1 and they can't find the problem(they think it might be because of the Zen Theme, but how?).
.htaccess =
=================================================================================
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order allow,deny
# 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
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# Requires mod_expires to be enabled.
# 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
# Various rewrite rules.
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} ^example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
# and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.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 /
# 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.81 2007/01/09 09:27:10 dries Exp $
=====================================================================
Link to site:
Ok how that this is enough, thanks in advance!
Comments
Look in your apache error
Look in your apache error logs. 99% of the time, you will find the reason there.
Jaypan We build websites
hmm 1 and 1 doesn't let you
hmm 1 and 1 doesn't let you look a the apache error logs
they let you do something like this,
==========================================================================
Since we don't provide access to Apache error logs on shared hosting packages for
technical reasons, you can create your own error logs for debugging PHP Scripts.
Please insert the following code in your PHP script (or create separate file and
and add the code in it. Include the file using "include()")
error_reporting(0);
$old_error_handler = set_error_handler("userErrorHandler");
function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars)
{
$time=date("d M Y H:i:s");
// Get the error type from the error number
$errortype = array (1 => "Error",
2 => "Warning",
4 => "Parsing Error",
8 => "Notice",
16 => "Core Error",
32 => "Core Warning",
64 => "Compile Error",
128 => "Compile Warning",
256 => "User Error",
512 => "User Warning",
1024 => "User Notice");
$errlevel=$errortype[$errno];
//Write error to log file (CSV format)
$errfile=fopen("errors.csv","a");
fputs($errfile,"\"$time\",\"$filename:
$linenum\",\"($errlevel) $errmsg\"\r\n");
fclose($errfile);
if($errno!=2 && $errno!=8) {
//Terminate script if fatal error
die("A fatal error has occurred. Script execution has been aborted");
}
}
===============================================================
I don't understand how this works though.
thanks
FIXED!
Ok i spent some time trouble shooting.
Looks like turning off the clean URLs fixed the problem.
Admin --> Config --> Clean URLs
check off.
.... But I like clean URLS.
Is this Drupal problem, or 1 and 1 just doesn't support it?
This sounds like 1&1 just
This is a 1&1 problem. First, the advice they gave you is no good because it requires PHP, but when the error is at the apache level, php won't be reached. Next, the problem with clean URLs is with them. Drupal requires it, but there is no reason that they shouldn't have mod rewrite available (which is what is required for clean URLs).
I'd say it's time to get a new host.
Jaypan We build websites
Solved by uncommenting one line
I uncommented line 98 in the .htaccess so it reads...
RewriteBase /
I see the original post has this line uncommented; They must have a different hosting package (directory structure?) with 1and1.
A comment in a related thread lead me here: http://drupal.org/node/232773#comment-840554, which lead to this solution for my client.
I agree that's its frustrating when a "host" has little or no insight into a problem or worse yet leads you on a wild goose chase. I've personally been with Hostmonster for 3 years with a much more Drupal friendly experience.
Edit: It's worth mentioning that the Clean URL's are intact in this scenario.
The rising tide lifts all boats.
Change RewriteBase /
@ TLGwegg
Have you tried changing "RewriteBase /" to " RewriteBase /your_subdirectory" ?
Also, I've never used Zen but when using a sub-theme do you have 2 .htaccess files?
The rising tide lifts all boats.