UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Help > Customer Support

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 11th August 2008, 09:59 PM   #1 (permalink)
cupoftea
Registered User
 
Join Date: Aug 2008
Location: London
Posts: 3
Multiple domains using the same PHP scripts

I've got a United Hosting reseller account, and I have a small number of domains hosted on it. They all use the same PHP scripts and database structure, so what I'd really like is to have all of these domains pointing to the same place for web content, and I'd like to serve it using a single set of PHP scripts and a single MySQL database. However, I would also like to keep the functionality of separate domains: email, ftp, and things like that.

Each of the domains, naturally, points to its own isolated directory, so if I want to run identical scripts on x.com and y.com, I have to have copies of the scripts at both of those domains. I don't really want that because

(a) when I update my scripts, I have to change them in more than one place, which is inelegant (and time consuming, because my scripts are rubbish and I keep needing to update them); and

(b) I want users to have control of their domain and its email and ftp etc, but not to have access to my immaculate scripts.

I thought I could set up aliases so that domains x.com, y.com and z.com all really go to a.com. The problem with that is that I would surely lose the functionality associated with a proper separate domain for x, y and z.com.

So I really want the best of both worlds: I want to have a full, normal, lovely UH installation for each domain, but I also want to have all web content served from the same set of PHP scripts in the same installation. Does a nice solution exist? I can see why it might not be doable, but on the other hand I can't be the only person who want a setup like this, so I worry that I've just missed something obvious...

Last edited by cupoftea : 11th August 2008 at 10:01 PM. Reason: typos + unclear explanations
cupoftea is offline  
Old 11th August 2008, 11:07 PM   #2 (permalink)
UH-Tony
Senior Server Administrator
 
UH-Tony's Avatar
 
Join Date: Mar 2006
Location: Houston, TX USA
Posts: 492
Sorry to say that due to the security features of our hosting environment it isn't possible to achieve the state which you are wishing for (the best of both as you put it).

While we can certainly understand the desire to do so, the added security is greatly more valuable than the increased convenience offered by what you are wishing to accomplish.
__________________
.
Tony
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Tony is offline  
Old 11th August 2008, 11:28 PM   #3 (permalink)
cupoftea
Registered User
 
Join Date: Aug 2008
Location: London
Posts: 3
Thanks very much for your reply. I thought there must be a good reason why everyone wasn't doing it. Oh well, at least I know now that there's no point trying to set things up that way.

However, I'd be interested if anyone has any thoughts or tips about keeping track of and maintaining similar PHP installations on different domains. I suspect I might just have to be organised. Not sure if I've got it in me...
cupoftea is offline  
Old 12th August 2008, 08:28 AM   #4 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
If this was possible it would also be possible for ANY other site on the server to view/use/abuse your scripts which is why its simply not something thats possible inter-site.

The key would be to maintain organisation here. Updates for most common scripts these days don't actually take long to run, and usually come with a self installing way of implementing them. It would just be a case of subscribing to the scripts mailing list to be informed of new releases, and keeping a note of any scripts your using so you have a list of places to go run the updates when they get released.
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline  
Old 12th August 2008, 09:06 AM   #5 (permalink)
MrBen
Munky!
 
MrBen's Avatar
 
Join Date: Sep 2003
Location: nr Woking, England
Posts: 2,596
Further to the above, you can share databases between different sites on the same server. The database has to belong to one of the sites and everyone has to use the same user account to login to that same database. Any storage space used by that database is also logged against the site it belongs to.

The only issue is with the script files. These can't be shared - unless you become a dedicated server customer when you can do as you please!

Ben
__________________
Veterinary Practice Management System by SoftFooding
Internet Data Usage Calculator: Estimate your monthly bandwidth usage for your Internet connection.
MrBen is offline  
Old 12th August 2008, 11:06 PM   #6 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,009
You could do it by reading the script file from another site and processing the file. But that would kill your site performance so is really not practical UNLESS you write some code to fetch a little file which has a flag in it saying script x y z have been updated. If they have, then you read those scripts and update the script file in your other site/s and set a flag file to say you've got the latest version. That way there would be neglible overhead and you only have to update scripts in one place.

But just as simple, if you have updated the scripts locally and assuming you have some decent ftp software, is to us the ftp software auto update many sites in a specified group with the updated scripts. SmartFTP can do this but you need to be very careful as the potential for accidentally overwriting stuff is great.
__________________
An old dog learning new tricks
percepts is offline  
Old 13th August 2008, 01:27 AM   #7 (permalink)
L Plates
Senior Member
 
Join Date: Jan 2003
Location: Wales
Posts: 415
I have found on a similar setup to achieve the same results as you want is to:
Have a central shared database where you keep the scripts, have a secure admin panel on each site that has a version number on and update link, when you update the script clients click the update and the files get rewritten. This is a quick overview but it is possible if you have a good php knowledge. I have done a similar setup to update administration panels over a number of sites that use the same admin type.
__________________
There is a very fine line between "hobby" and "mental illness."

North Wales Web Design
L Plates is offline  
Old 13th August 2008, 11:14 PM   #8 (permalink)
cupoftea
Registered User
 
Join Date: Aug 2008
Location: London
Posts: 3
Thanks for the suggestions. I might look at implementing something like that at some point, bearing in mind that there are probably security issues I should think about if I'm going to open scripts up for moving across the internet.

The current setup might mean I can't be as lazy as I want to be, but it's reassuring that United Hosting are protecting people like me from themselves.

Anyway, for the moment I suppose I should really concentrate on making the scripts work in the first place...

Cheers.
cupoftea is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:46 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309