- CCK form field changes using Drupal's hook_form_alter don't work? Use #after_build
- Views query substitutions in Drupal 6
- Should you be building your next website in Drupal?
- How to add Zoopy video to your Drupal site using CCK and the Embedded Media Field module
- My state of Drupal, today, 18 March 2009
- Drupal Johannesburg 11 March meetup notes
- Quick Drupal setup using Acquia's DAMP stack
- Drupal conference 2009 videos available on the Internet Archive
- Drupal 500 Internal Server Error on shared hosting
- The case for Drupal
Drupal 500 Internal Server Error on shared hosting
Was getting irregular "500 Internal Server Error" pages on a new Drupal 6 install, running on shared hosting.
After some research it appears that the hosting company is running php5 as CGI which does not follow the PHP directives set in Drupal's .htaccess file:
# 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>
This post suggests commenting out these PHP specific settings, and adding the following to your php.ini (if you have access to it - some hosting companies don't allow this, although there are workarounds):
magic_quotes_gpc 0 register_globals 0 session.auto_start 0 mbstring.http_input pass mbstring.http_output pass mbstring.encoding_translation 0
This seems to work - I'll update in the comments if I run into this issue again.
