hello, i'm a french drupal addict :
i have two folder on my web-root folder
http://mysite.com/fr/ (the drupal code is here)
http://mysite.com/en/ (empty folder)

i have
//mysite.com/fr/sites/default/setting.php (can i rename "default" folder to "mysite.com.fr" ?)
$db_url = 'mysql://xxxx:xxxx@xxxx/xxxxxx
$db_prefix = 'Fr_' and $base_url = 'http://mysite.com/fr'

//mysite.com/sites/mysite.com.en/setting.php
$db_url = 'mysql://xxxx:xxxx@xxxx/xxxxxx
$db_prefix = 'En_' and $base_url = 'http://mysite.com/en'

all the tables are in the same bd with there own prefix (Fr_ and En_), i used this very good issue http://drupal.org/node/20530
i want to have just one admin-interface for adding contents in my two (they'll have differente contents and maybe customized theme)
how can i create symbolic link with windowsXP and filezilla (ftp client) for accessing in a drupal interface when i put http://mysite.com/en url on my browser ???

the doc says :

"Sites do not each have to have a different domain. You can use
   subdomains and subdirectories for Drupal sites also."
Each site configuration can have its own site-specific modules and
   themes that will be made available in addition to those installed

thanks for helping me..all the thread i have readen are confused !

Comments

robby@drupalfrancais.zapto.org’s picture

please help me !
i also want to make a tutorial with it

robby@drupalfrancais.zapto.org’s picture

please help me !
i also want to make a tutorial with it

heine’s picture

Insufficient information.
Does the server run on Windows XP or a Unix flavour? Do you have shell access?
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

pfaocle’s picture

"how can i create symbolic link with windowsXP and filezilla (ftp client)"

I don't think you can with FileZilla. You'll need to SSH into the server with PuTTy, and do something like:

ln -s /path/to/source/directory /path/to/target/directory

WinSCP with a SSH connection to your server may support this too, but I'm not sure.

---
paul byrne
paul.leafish.co.uk | www.leafish.co.uk

---
Paul Byrne
pfaocle.co.uk | CTI digital

robby@drupalfrancais.zapto.org’s picture

Do you have shell access?
no (share hosting)
i suppose it runs on Unix

heine’s picture

The shared hosting is going to make it difficult. The easiest (and quickest) thing you can do is to ask your hosting provider to point the URL or directory /en to /fr

You can try to delete the directory 'en' and make a symlink by uploading and visiting the file:

  exec('ln -s ActualFilename LinkFileName');

--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

robby@drupalfrancais.zapto.org’s picture

thanks, i'll try
but i replace ActualFilename and LinkFileName by what ?
(i'm not a language linux addict)
where i put the php code below ? in an index.php ?

heine’s picture

I think it least risky to ask your host to make a link from en to fr.

But you can also try using eg makelink.php with:

  exec('ln -s fr en');

upload it to the document root and visit the file makelink.php.

The function exec is often disabled though.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

ijulie’s picture

I'm sorry to be very dense about this, but could someone talk me through this one more time?

I want to run a site in a subdirectory off a drupal install in the root directory. so my two URLs are:

http://mysite.com
http://mysite.com/subdirectory

the settings files exist:
//mysite.com/sites/default/settings.php
//mysite.com/sites/mysite.com.subdirectory/setting.php

so what I want to do is create a symlink so that when someone visits http://mysite.com/subdirectory it points to the drupal code at http://mysite.com

so if I use the command

ln -s /path/to/source/directory /path/to/target/directory

as per the above:

a) what do I put as the source and target: "path/to/root path/to/root/subdirectory"? or is it the other way round ("path/to/root/subdirectory path/to/root")?

thus far I tried it both ways, putting the resulting makelink.php file in root and opening it in a brower to try to make the symlink. it hasn't worked.

ijulie’s picture

can someone explain to me what a symlink is?

if it's just a matter of redirection, i.e. redirecting http://mysite.com/subdirectory back to http://mysite.com so it can run off the drupal installation there, wouldn't it be easier to do that in the front end by just forwarding the URL?

ijulie’s picture

needless to say, that doesn't work.

but I got multisites up and running using an alternate method (bootstrap.inc patch plus rewrite in .htaccess) as explained in http://drupal.org/node/37177

hurrah!

ijulie’s picture

OK, I'm now trying to set this up for a second site, this one with a different domain name:

http://mysite.com (main drupal installation)
http://examplesite.com (which is run from http://mysite.com/examplesite and/or http://examplesite.mysite.com)

the settings files exist:
//mysite.com/sites/default/settings.php
//mysite.com/sites/examplesite.com/settings.php

I can't get either of the multisite methods to make this work.

I tried to run the command

ln -s /home/username/public_html/ /home/username/public_html/examplesite/

and it didn't work. it there a way to make this configuration happen, or is the domain masking screwing it up? help??

ijulie’s picture

for the record, I've got it working as http://mysite.com/examplesite using the .htaccess method (not symlinks). I gave up trying to get the same thing to work with http://examplesite.com (I was getting 403 and 500 errors when I tried to convert the configuration over). for now I just set up http://examplesite.com to forward to http://mysite.com/examplesite, but I'd still love a better solution... someday.

ytwater’s picture

Great, luckily this PHP script worked. I used my fullpath name in the script and it created a symbolic link in the directory.

<?php
  exec('ln -s /home/content/root_directory/html/ /home/content/root_directory/html/subdirectory');
?>

btw, I am hosting on GoDaddy.com (so I was pretty sure it would not work!)

Thanks for the code.

georgestopka@gmail.com’s picture

I tried putting this in a file, uploading it, and then going to it from my browser.

<?php
exec('ln -s . site2');
?>

That created the symlink.
This is allowing me to use Drupal's multiple sites features with GoDaddy. I don't think there's any other way I could do it, since I've got no shell access and I can't get them to change the apache conf file.

This kind of stuff doesn't work for me:

<?php
symlink ( . site2 ) ;
?>

I don't know whether full paths are better than relative paths, I'm just glad that it's working.

This info is not located anywhere but in comments. It should be in a handbook and also pointed to from the settings.php file.

heine’s picture

That should have been

symlink ('.', 'site2') ;

Because you're on Godaddy consult the Troubleshooting FAQ on lock table privileges: http://drupal.org/node/17241.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

manoloka’s picture

I want to create a second site using multi-site,

I'm a bit confused with the symlink command.

the path where the drupal installation is (which is the root of the domain)

/home/fhlinux148/d/mydomain.co.uk/user/htdocs

the new site is going to be a beta-test (so I can test new modules/stuff before adding it to the live site) and I want to access to it from mydomain.co.uk/beta therefore the path will be

/home/fhlinux148/d/mydomain.co.uk/user/htdocs/beta

So, what is the correct command that I need;

1 - ln -s /home/fhlinux148/d/mydomain.co.uk/user/htdocs/beta /home/fhlinux148/d/mydomain.co.uk/user/htdocs

or

2 - ln -s /home/fhlinux148/d/mydomain.co.uk/user/htdocs /home/fhlinux148/d/mydomain.co.uk/user/htdocs/beta

I think 1 is the correct answer but ... not 100% sure, any input on this?

thanks
MK :-)