Joomla and drupal on same domain



I’m trying to compare joomla and drupal as possible bases for some websites, but they seem to be incompatible. Drupal requires session.save_handler in php.ini to be “user”, but this seems to kill the administrator login for joomla. Leaving it at the default “files” kills drupal. (I used the technique in the Wiki page “Advanced PHP Configuration” to change the setting, along with magic_quotes_gpc).

OK. So the obvious (but perhaps wrong) thing to do is to set up two separate versions of php.ini, one for Drupal and one for Joomla. The script calls for the php-update scripts to be in a directory ~/php5. I left that one for Drupal use, and created another directory ~/php5j for joomla use. I altered the php-update.php script as follows:

[code]switch ($directory) {
case ‘php’:
$php = ‘php’;
case ‘php5j’:
$php = ‘php5’;
case ‘php5’:
$php = ‘php5’;

// The full paths to the source cgi and ini
$sourcecgi = ‘/dh/cgi-system/’ . $php . ‘.cgi’;
$sourceini = ‘/etc/’ . $php . ‘/cgi/php.ini’;

// Get the HOME environment variable
$home = $_SERVER[‘HOME’];

// The full paths to the target cgi and ini
$targetcgi = $home . ‘/’ . $directory . ‘/’ . $php . ‘.cgi’;
$targetini = $home . ‘/’ . $directory . ‘/php.ini’;
[/code]and put the following .htaccess file in the joomla home directory (not the site home directory, which is one level higher, and has the .htaccess file copied from the wiki page:

[code]Options +ExecCGI
AddHandler fastcgi-script fcg fcgi fpl
AddHandler php5-fastcgi .php
Action php5-fastcgi /php5j/php5-wrapper.fcgi

[/code]The php.ini update process seems to work fine, but when I try to point the browser to any URL of the form http://site_home/joomla/dir1/dir2/file.html (where dir1 and dir2 could be null), I get

The requested URL /php5j/php5-wrapper.fcgi/joomla/di1/dir2/index.php was not found on this server. I’ve puzzled over this, searched the Web for a better understanding of .htaccess, pored through the php-update.php code, searched this forum, and I have not the slightest clue where I could have gone wrong or where this “joomla/…/index.php” comes from that is added to the php5j/php5-wrapper.fcgi that ought to be executed.

So I finally ask for help!


My recommendation to maximize both convenience and security is to create two different subdomains, with their own individual user account, for your Joomla and Drupal installation.

Those CMS packages are both pretty robust, which translates into a lot of ways for subtle things to screw up. Especially when using mod_rewrite. YMMV of course, but that’s what I did.

Where does $_SERVER{“HOME”] get set? For me it comes back empty, which would cause problems with the pathing like you’re seeing. The closest thing I can see to your “target” directory stuff is something like: $_SERVER[“DOCUMENT_ROOT”]

Maybe you’ll want to take a peek at the output from phpinfo() or print_r($_SERVER). Keep in mind I am not very well versed on fcgi yet though.