Joomla with suPHP: Premature end of script headers: index.php

Thursday, July 30th, 2009

Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work:


ServerAdmin aa@aa.com
ServerName www.site.org
ServerAlias site.org
DocumentRoot /home/virtuals/www.site.org/public_html/
ErrorLog /home/virtuals/www.site.org/logs/error.log
CustomLog /home/virtuals/www.site.org/logs/access.log combined
ServerSignature On
php_admin_flag safe_mode Off
php_admin_flag register_globals On
php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp



AllowOverride All
Allow from All
Options Indexes FollowSymLinks



php_admin_flag engine on
suPHP_Engine on
AddHandler php5-script .php
php_admin_flag engine on

Error : Database Error: Unable to connect to the database:The MySQL adapter “mysql” is not available.

Thursday, July 30th, 2009

Got this error :

Database Error: Unable to connect to the database:The MySQL adapter “mysql” is not available.

There are some reasons why this occurs:

- php-mysql not installed
- php admin flags wrong set
- wrong suphp configuration, handlers should be:

[handlers]
;Handler for php-scripts
x-httpd-php=”php:/usr/bin/php”

;Handler for CGI-scripts
x-suphp-cgi=”execute:!self”

Error: not within configured docroot

Thursday, July 30th, 2009

Got this error these days :

[Thu Jul 30 06:58:16 2009] [warn] Script “/home/virtuals/www.site.org/public_html/index.php” resolving to “/home/virtuals/www.site.org/public_html/index.php” not within configured docroot

add docroot into your suphp.conf file and restart apache