Inconsistent Internal Server Error 500 on drupal install on some pages

I have Drupal 6.4 installed on a GoDaddy account.  The Drupal install has worked great since day one ( a few months now) with Clean URLs enabled.  Today i go to the website and i get an error message that reads:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, 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.

Apache/1.3.33 Server at Port 80

This is exceedingly disturbing because just a day or so ago i was making a few changes; HOWEVER, everything was working fine.  

Even more interesting.  The Internal Server Error only shows when trying to access certain pages.  

If not logged in: if you go to the home page ( you can see the server error
but if you go to you can see the site is working!

if i am logged in (via i can view the home page and successive pages such as or or even or PERFECTLY FINE.  

also not, for example.  That when i am logged in with the admin account i can view just fine.  However, when i'm not logged in, after viewing, viewing yeilds the 500 Internal Server error.  What gives?

Most importantly, I CANNOT access and thus i am at a loss as to what to do.  

I had not modified the base .htaccess file prior to this happening.

check it out for yourself.  go to then go to
The website is currently in maintenance mode; thus you should only be able to access basic pages unless you log in.

I have tried downloading a fresh install of drupal 6.4 and uploading & replacing the base files including the .htaccess file to the server.  This yeilded NO CHANGE.

I also tried installing a backup of ALL the theme files and folders i have been modifying from weeks ago (thus these files were all from WEEKS before this problem started happening). This also yeilded NO CHANGE.  

Thus i am led to believe it has to be someting with the server; however calling GoDaddy has only led to dead ends and them blaming scripting errors and advising i ask Drupal for help.  But i don't recall doing anything to the code that would have caused this.

This is a very urgent problem.  Any advice or help would be greatly greatly appreciated!!

feel free to ask me questions i'll do my best to be as thorough as possible,

Thanks in advance
Who is Participating?

Improve company productivity with a Business Account.Sign Up

LeftHandedPantsConnect With a Mentor Author Commented:
good news.  i just tried 2 more experiments.

first i tried (after backing up all files and db for drupal) uploading the backed up drupal files from way before this all happened and nothing changed and overwriting the files currently on the server
the 500 internal error still came up.

so i deleted every single file on the server except the settings and default.settings.php files.
then i uploaded all the files (same as experiment above) from the previous backup to the server.

This fixed the problem.

After logging in i saw Cron was having problems, had been running for " more than an hour"... probably more like days.  regardless i treid to run it manually a few times till it finally worked.  now the website seems perfectly fine.

... i just hope it doesn't happen again...

...i wish i could've figured out why the cron got stuck running....
...i wish i could've figured out what caused it all.   goodness....

that being said... YAY... i'll still look forward to hearing your thoughts
can u attach the error log here?
LeftHandedPantsAuthor Commented:

Thanks for the reply...

I would love to but because my website is on a shared hosting account with GoDaddy i can not access the server's error log.  


Are you referring to a different error log?
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

ftp to your site and check if you have a folder called logs, their has to be an error log,
if you can't find one, use the control panel they have provided to get error log.
it is a log  created by apache.
LeftHandedPantsAuthor Commented:
i am finding no error, or log files or folders in my FTP directories.
neither am i finding any such logs in the GoDaddy hosting manager.

In drupal there are access logs, error logs, etc.  However the only way i know to view these are via the web interface after logging in as the ADMIN.  The admin pages, however, are the pages that give the internal server error, so this will not work to view the error logs.

...perhaps i can find an error log table in the database.  I'll look into that and get back to you asap.

also, i'd be willing to grant someone temporary FTP access to the PHP files if you have enough time to commit to this
check this article and see if you can find the location of error log
LeftHandedPantsAuthor Commented:

After going to that exact part of the hosting control panel mentioned in the Article, there is no option marked "error logs."  

That article says "NOTE: This article only applies to Deluxe and Premium hosting accounts running Hosting Configuration 2.0."
HOW STUPID, i guess i have to pay extra just for some error logs!?
Unfortunately i have GoDaddy's Economy Hosting account.  I can not believe they would exclude error logs from this.  How rediculous.  Is my only option to upgrade to a more expensive hosting plan just so i generate more internal server 500 errors to log them?

I wont hesitate to call them and complain about this or request some sort of error log information.

I have to turn in for tonight but i will be back in touch tomorrow. thanks again for your responses!
to save time, I guess you should send them an email to get the error log location. I don't think they will hide it it should be there even in very cheap hosts.
let me know when you get a response from them.
check this link can you find anything?
and to do some tests, try to rename .htaccess files, does it work when renamed?
LeftHandedPantsAuthor Commented:
thanks for your responses.  I talked to them again.  Again they said that it is "ABSOLUTELY IMPOSSIBLE" for me to view any sort of server or system error logs for my website, unless it is on a dedicated server.

thus i have been doing some tests.  I did try renaming the .htaccess files,  i also tried deleting it completely (led to highly undesired results), i also tried replacing it with a fresh .htaccess file from the drupal 6.4 download from drupal's website.  All these had no effect on getting rid of the internal server error when view the admin page(s).

Thus, i believe it must have to do with some file, or included file, or scripting error in a theme file or something somewhere.  I can't for the life of me think of a related significant file i may have edited to make this happen, however, i'm trying to do tests to narrow it down.  I'll let you know how they turn out.

Do you agree?

Do you have any other ideas?

Thanks for your help
LeftHandedPantsAuthor Commented:
here's what my current .htaccess file looks like:
# Apache/PHP/Drupal settings:

# 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

# 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.

# 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

# 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

# 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

# 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,
  # ( will be redirected to
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$$1 [L,R=301]
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # ( will be redirected to
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$$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 uncomment and
  # modify the following line:
  # RewriteBase /drupal
  # If your site is running in a VirtualDocumentRoot at,
  # 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]

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

I did try uncommenting the line:
  # RewriteBase /
however that had no effect either.  Not to mention, from my understanding, that only applies to if drupal is installed in subfolders.

Also, clean urls and ModRewrite, etc IS WORKING.  Like i said, when i log in i can go to pages that were created such as or just fine and it DOES NOT use the ?q=, thus the rewriting stuff is working.  Its only when i try to go to or if im' not logged in that this happens.  

I'll figure this out eventually, i have to.  Thanks for any advice...

khaledfConnect With a Mentor Commented:
without apache error log it would be extremely difficult and time consuming to track down the cause of the error.

I think GoDaddy sucks for their response. how can't they provide error log for your website?!!

open a support ticket and let them convince you that it is scripting error. let them mention the error message that says so.

if i were in your position I'll move to another hosting company.

create a file called info.php that contains the attached code

access the file e.g
then save it and attach it here.

maybe this would help narrowing the possibilities.

Open in new window

LeftHandedPantsAuthor Commented:
WOW great suggestion.  I did a few tests today.  I'll do your suggestion and notify you about the tests i've done tomorrow as soon as i can.
LeftHandedPantsAuthor Commented:
Okay so here's some news.
Here are the a few of the experiments i've done:

I have tried overwriting the theme files with ones that were backed up a few months before this started happening
NO CHANGE- thus i reverted this

I have tried overwriting the base drupal files such as .php with "fresh" ones from
NO CHANGE- thus i reverted this

I have tried copying this drupal installation to a new server which will give us clues.  i moved over all drupal files and the database, etc. Every thing seems to match up on the new temp server.
This no longer yields a 500 internal server error, all seems to function correctly and i can now access the ADMIN pages, etc, on the new server. so far EXCEPT a few errors spit out from drupal:

Warning: Invalid argument supplied for foreach() in /home2/schwebde/public_html/wfh/includes/ on line 443

Warning: Invalid argument supplied for foreach() in /home2/schwebde/public_html/wfh/includes/ on line 448

I'm not sure if this is what is causing the 500 internal server error on the ORIGINAL server or not, nor how to fix it.  I will experiment with replacing for example with a fresh version, but haven't done that yet.

On the new server cron does run manually but doesn't return to the Status Report page, rather just leaves you on the blank page with the two errors above.

I have put info.php on each server.  Check out
Original server:
temporary other server:
any thoughts?

A plus that things are working a bit better on the new server is that i can access drupals error logs.  
I have created a new user account so you can log in to the COPY of this drupal install on the new TEMP server and view the error logs that drupal saved.

just go to
Log in with username: experthelper
password: temp
then go to the logs at:
things seem to go awry at the log entry for 10/01/2008 - 13:00

So, there's some information.  Any thoughts?  I'll keep you updated...

so far on my new server (which is at hostmonster- a heck of a lot better than godaddy) there are NO error logs relevant to what i just installed at

looking forward to your reply
LeftHandedPantsAuthor Commented:
stuff being passed doesn't seem to work on new server.  but they do sometimes

for example when i logged in as administrator on the new server,  it took me to a page with the address: but it was just a blank page with the error messages on it.
i then went back to the admin page by going to

and it had successfully logged me in but there was a new error message shown:
# warning: Cannot modify header information - headers already sent by (output started at /home2/schwebde/public_html/wfh/includes/ in /home2/schwebde/public_html/wfh/includes/ on line 101.
# warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home2/schwebde/public_html/wfh/includes/ on line 104.

whatever, i don't care if these are irrelevant to the situation on the other server.  I essentially want to figure out what is causing the 500 internal server error on the original server.

i wish i could figure out what those error messages left.  so far google searches aren't helping.

replacing the includes/ file with a "fresh" one yeilded no change.
khaledfConnect With a Mentor Commented:
First of all, Congrats for getting your site working again.
secondly,  big THANKS for putting your findings here so others may find it very useful.

It is very likely that a cron job got stuck due to memory limit being not sufficient.
if the problem happens again check your memory_limit in php
set it to memory_limit = 128M like your temp site has

LeftHandedPantsAuthor Commented:
Thanks again for all your advice.  Indeed, i hope this post helps others work similar problems out.

Thanks for the advice regarding the php memory limit.  I will keep a close eye on that.

At the moment, however, i'm thinking it had to be some scripting error.  

I'm not sure what to do at this point.  I feel you deserve points for helping me, even though I technically fixed it myself.  

...not to mention i need the remaining points to ask yet another question.  Thanks again!
Not at all LeftHandedPants, the points are not that much important for me, satisfaction and credit is the most important. Also the question and analysis done by you makes it a good reference.

wish you all the best.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.