cancel
Showing results for 
Search instead for 
Did you mean: 

Using database for a sub domain

Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Using database for a sub domain

With the help of Kev Mawson and others I have finally got my sub domain up and running now the A records are sorted http://community.plus.net/forum/index.php/topic,80121.0.html
All I need to do now is to get my forum software installed but I need to get the sub domain to use my MySQL DB in Plesk PAYH. I can't quite figure that one out.
Just tried the 'web applications' tool in plesk but it rejected the install for the obvious reason that it can't connect to the database. Cheesy
Help in pointing things in the right direction needed please.
Andy
15 REPLIES 15
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

You have to use the same database as on your main domain. I have actually adding hosting of a mydomain.me.uk domain to my PAYH account and am running SMF and Mambo on that using the database from the www.username.plus-payh.co.uk (which also has a test Mambo setup).
When you install the packages you need to specify a different table name prefix obviously. I also created an extra user on the database which I use to access it from the me.uk applications.
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

SMF has an easy install system which involves uploading a file
Quote
webinstall.php

Then you type into the address bar of browser, domain (where file is) /webinstall.php and allegedly hey presto! but it clearly isn't seeing my DB so how do I tell my subdomain to use my main DB. Can't seem to tell subdomain.domain.co.uk to point at DB. I'm clearly missing something but need a prod in the right direction.
On the other hand perhaps this method doesn't work on payh and I need to untar the full package using the CRON method and manually telling it where things are.
Guidance from you far superior beings please.
Andy
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

I know it works on PAYH - I've done it! I have Mambo and SMF both running on my personal domain hosted on there with both of them using the database from www.username.plus-payh.co.uk.
In Plesk, when you created the database (using a name you chose) you will have created a database login and user name. In the installation when it asks for the database details you enter the name of the database server which will be something like plesk-db01.plus.net and the login name and password you created. You will also have to give it the name of the database you created. Then to make sure that the tables about to be created don't clash with tables used in other domains you will give a prefix (e.g. SMF2_)
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

All understood. I gather from your reply that the SMF install script (webinstall.php) won't work because It doesn't let me get even close to telling it the DB name.
I'll upload the tar file and untar it in the usual way then go on from there.
Thanks for your help.
Stand back, I'm going in, this could be messy! Wink
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

I couldn't get the webinstall to work and so I went for the normal installer. But I would have thought the webinstall should have asked for the database details at some stage as I thought it intially just downloaded and uppacked all the software and then went in to the normal install script. Which SMF are you trying, RC2 Public?
I think the webinstall failure may have been down to permissions/safe mode issues.
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

Actually I think this topic and your other one on this board should be in Web Hosting (including PAYH)
I'm going to pop a note to the moderators.
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

Hmmmmm Roll_eyes
I'm falling at the same hurdle even from a different approach.
I first tried the CRON method of untarring  (after changing the path to the right directory. and it wouldn't play. So I untarred on my computer and up loaded all the files into the httpdocs directory of my forum sub domain by ftp.
I pointed my browser at forum.mydomain.co.uk/index.php and up popped the installer but when filling in the host, username, password and path (it worked the last bit out itself) it came up with:-
Quote
550 /vhosts/mydomain.co.uk/subdomains/forum/httpdocs: No such file or directory
This is exactly what the 'webinstall.php' script did too.
I also tried changing this to:-
Quote
/vhost/forum.mydomain.co.uk/httpdocs
but still it wouldn't have it.
I assume that old chestnut 'paths' is my problem but can't figure what I am doing wrong.
I also changed the suggested files and folder permissions to 755 and still nothing. Any ideas?
Regards
Andy
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

Try /var/www/vhosts/yourdomain.co.uk/httpdocs/
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

Nope!
I've even rechecked the permissions on the suggested directories and files.
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

oops! attachment would play.
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

You haven't put the /var/www/ on the front! That's what worked for me.
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

Quote
You haven't put the /var/www/ on the front! That's what worked for me.

Not in the attachment but I have tried it.
What you see in the attachment is what it detects automatically.
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: Using database for a sub domain

Was that using webinstall?
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Word_Warrior
Grafter
Posts: 503
Registered: ‎30-07-2007

Re: Using database for a sub domain

Quote from: jelv
Was that using webinstall?

Both in web install and having uploaded all the files into the directory and putting forum.mydomain.co.uk/index.php into the browser address.
Same results