Hi All,

I need some information to get multiple sites working in 4.6.0. If my default Drupal site is at www.example.net and I want another site at www.example.net/subsite then according to the documentation I have to make a directory in sites called www,example.net.subsite and in the settings.php file in that directory point to the subsite mysql database and make the base URL www.example.net/subsite. If my document root for www.example.net is /www/srv/htdocs then I assume my content for this subsite would go in /www/srv/htdocs/subsite. My default site works fine. The subsite works if I put the Apache index.html in /www/srv/htdocs/subsite but if I put the Drupal index.php file in that directory I get the errors below. Do I need to put any other files/dirs in the subsite directory? I thought that Drupal was supposed to look in /srv/www/htdocs for include files etc ?.

Warning: main(includes/bootstrap.inc): failed to open stream: No such file or directory in /srv/www/htdocs/subsite/index.php on line 12

Warning: main(): Failed opening 'includes/bootstrap.inc' for inclusion (include_path='.:') in /srv/www/htdocs/subsite/index.php on line 12

Fatal error: Call to undefined function: drupal_page_header() in /srv/www/htdocs/subsite/index.php on line 13

Thanks

Murray

Comments

killes@www.drop.org’s picture

Remove that directory and add a link back to the main directory instead.

ln . subsite

As an alternative you can change the Apache conf to point to /www/srv/htdocs for the subsite as well.
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.6 will support PHP 5.

muzza’s picture

Hi Killes,

Thanks for your help. I created the link and the subsite works now :-).

Is the section "More than one drupal site on one machine" in the handbook being updated for 4.6?

Murray

freyquency’s picture

Hi,
I'm using phpshell to get into my remote host. I'm not sure if I'm getting the terminology correct:

ln . subsite

would be ln dot subsite ? and nothing else? The other possibility is that I don't have root access so I would not have permission to create a link, therefore I cannot utilize subsite creation in this method.

In response to ln . subsite i receive "hard link not allowed for directory"
In response to ln -s subsite i receive "creating symbolic link './subsite to /subsite' : Permission Denied

kbahey’s picture

How about:

ln -s . subsite

Does that do it?
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

freyquency’s picture

no. I think I may be blocked from creating symlinks on my host. real bummer. it would be very useful if there were a method that could be implemented to do this - a module perhaps. Sort of an alternate way to do so. It's one of the things I miss from when I used MT.

Theo Schouten’s picture

You might be able to create a symbolic link with a PHP file, say "makegendt.php", which you execute using your browser, like http://yoursite/makegendt.php.

With content:

<?php
$lf='gendt';
if( file_exists($lf)){
 echo("$lf exists already<br>");
 }else {
   $ret = symlink('.',$lf);
   if($ret){
     echo("$lf symbolic link created<br>");
     } else {echo("error creating $lf<br>");
   }
}
?>

a symbolic link called "gendt" is created in the directory in which "makegendt.php" is located. It points to that directory.

bertboerland’s picture

i am sorry you have such a problem installing drupal, but keep on trying it is worth it and you are nearly there. looks like the path settings in your php configuration doesnt include the drupal install dir. see this node. can someone with cpanel knowlegde a bit of a hand here?--
groets
bertb

--
groets
bert boerland