Jump to content


Photo
- - - - -

Etomite Multi-Site


  • This topic is locked This topic is locked
21 replies to this topic

#1 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 17 October 2008 - 12:41 AM

Well guys and gals, if you've been following my blog, you'll know I've been toying with multi-site capability within Etomite... and I've finally got it to a stage where I'd like people to try out my site...

The site, would be a subdomain on a main domain (in this instance) [*1]. I've integrated the installer into the cPanel API, which means that the installer can automatically create individual mySQL Databases and users - so the Databases are all kept separate... this is also handy as it means a sys-admin could use phpMyAdmin to backup the database if it's working on a staging server before going live and installing it onto a production single install server.

The installer also creates the needed assets folders for each site, and CHMOD's them correctly.

Each site has it's own assets folder, which means unique cache files also.

Anyway, take it for a whirl. The domain's wildcarded, so to set up your own, pick any subdomain of the etomitesites.com domain.
Then, once you've picked a subdomain, add /installer/ to the address bar.

i.e. http://thisisithesub....com/installer/ ... PICK SOMETHING UNIQUE!

It'll set you up with a fully functioning Etomite website that's running from one Etomite install....

The code isn't (at this moment in time anyway) going to be made publically available - but could well influence how the integration could be done in future versions of Etomite... [*2]

Constructive Feedback Welcomed. Remember, it's still in development, so let me know of any bugs.... and don't store any important data as it could be deleted at any time!

[footers]
1. Actual top-level domains could be used, but would require third-party action to park the domain on top of the main one.
2. I've done all the coding for this myself - I'm not a PHP coder, so have quite literally "butchered" the code, which means it's not really suitable to release - but I've explained to Ralph the concept so could choose to implement something similar....

#2 darren

darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 17 October 2008 - 01:56 AM

seems to work fine for me...installed the light version at etomiterocks.etomitesites... uploaded images with the xinha editor and used the file manager.

however, if i save a document (i have had cache by default set to 'no' and 'yes' in configuration) i get this message:

bug fixed by dean

(tried to get codebox to play nice)

Edited by Dean, 17 October 2008 - 09:22 AM.
fixed bug


#3 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 17 October 2008 - 08:30 AM

Great job Dean. I created a lite install in the link you posted above- twice (different database details)- I'm not sure what happened to the old database, I think it just got orphaned, therefore a check will probably be needed to stop others overwriting a subdomain (but I think you already know that according to your instructions (pick something unique)... Perhaps a simple dialogue to run an unlink command for the install folder after successful creation would do it.

I also created a full install with a different subdomain "crisDTest". All versions were quick and stable. Great job, this has a lot of possibilities for deployment options and uses.

#4 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 17 October 2008 - 08:44 AM

A bug?? New pages created in the full and lite installs have an error:
« Row count error in template query result. » SQL: SELECT * FROM `dbetomi_crisD`.etomite_site_templates WHERE `dbetomi_crisD`.etomite_site_templates.id = '';

ie the templates selected are not applying to the document as requested.

Also, with self-service site creation, it would be nice to have self-service site deletion... I tried to clean up, but I now have to leave that with you Dean :)

Also, I get the same error as Darren- above when I try to delete a document.

Edited by Cris D., 17 October 2008 - 08:52 AM.


#5 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 17 October 2008 - 09:21 AM

« Row count error in template query result. » SQL: SELECT * FROM `dbetomi_crisD`.etomite_site_templates WHERE `dbetomi_crisD`.etomite_site_templates.id = '';

I don't seem to be able to reproduce this error - what's the procedure to create it?
I've also fixed the other bug - I've gone through nearly every processors file updating the cache location...


Regarding the self-service deletion, it'd mean having to create an account area etc where it lists your installs etc.. which'd be a headache... I'll have to have a ponder.

Spoiler


All test sites have been deleted - the installer now creates a config.lock file for all sites installed, to stop the installer being re-run.

Spoiler


#6 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 17 October 2008 - 09:53 AM

i do need to (at some point) disable the ability for a user to choose their database (make them all unique) - it could cause problems if someone uses a common word and someone else tries to install with that same word - it'd throw all sorts of errors...

This has been done now :)

#7 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 17 October 2008 - 11:37 AM

I don't seem to be able to reproduce this error - what's the procedure to create it?

Create an account
Agree to terms and conditions
Choose login details
Log in to manager
Click "New Document"
COnfirm that a template is selected in the publishing tab.
Select "Published" and "Show in menu" (these have been changed since last test)
Save the new document
Click "Launch site"
The page now has an alias "etomite-forums" although the alias is not set....
The template is now "0" and the database name is now not the same as the one I chose...
and the template error stands.
http://crisdtest3.et...ite-forums.html

Edited by Cris D., 17 October 2008 - 11:39 AM.


#8 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 17 October 2008 - 11:48 AM

Did you do the normal procedure and goto the etomite settings page and save? ;)

You shouldn't have been able to choose a database name :/ it's randomly generated during the installer to stop duplicates...

#9 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 17 October 2008 - 12:08 PM

I did save the config settings for the first 3 tests, but forgot for the 4th test :blush: . After saving the settings, page template error now gone. B) All good now.

#10 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 17 October 2008 - 10:29 PM

Good Good :D
No outstanding bugs?

#11 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 18 October 2008 - 09:15 AM

The only thing that makes me wonder is how you are handling being able to create new installations using the same subdomain. For example, clicking the link above in your first post allows the complete installation to re-ocurr (but with a different database). This would efecctively allow me to create a site over someone elses existing one if I liked the name they selected or was oblivious to it's existance. Granted, the stop-installation log should stop this ocurring by pointing to the installation file in an existing site, however it is not stopping a new installation from running over the top.

#12 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 18 October 2008 - 09:30 AM

Have you clicked the link? I made a routine within the installer to check for an existing site (the installer right at the end generates a .lock file which if detected stops the installer running).

#13 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 18 October 2008 - 12:05 PM

Yeah, I was able to do it this morning and can still do it on another existing test site,
http://crisdtest2.etomitesites.com/
http://crisdtest2.et...s.com/installer

I must have tested it before you had the code added. Works well now. Havn't found anything else, will let you know if I do. I thought you had bitten off a lot to chew here, but it looks like you chew pretty well...lol.

#14 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 18 October 2008 - 01:38 PM

I deleted all test sites yesterday, so that test site doesn't exist - thats why you can run the installer ;)

#15 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 18 October 2008 - 09:05 PM

I deleted all test sites yesterday, so that test site doesn't exist - thats why you can run the installer ;)

OK, the post above that says you deleted sites was Oct 17 2008, 07:21 PM
The post above links to a site that is avaliable (click the first link and see).
http://crisdtest2.et...s.com/home.html
Page Last Edited: 18-10-2008 03:30 PM. Site Last Edited: 18-10-2008 03:30 PM. MySQL: 0.0079 s, 11 request(s), PHP: 0.0174 s, total: 0.0252 s, document retrieved from cache

and this page:
http://crisdtest2.et.../resources.html
Page Last Edited: 15-10-2008 10:31 PM. (Prior to site deletion)
Site Last Edited: 18-10-2008 03:30 PM. (after site deletion)
MySQL: 0.0086 s, 12 request(s), PHP: 0.0208 s, total: 0.0294 s, document retrieved from database

Logging into the manager results in a "Failed to create a database connection".

I believe you have partially deleted this site, but portions of it still exist whether they are files and/or database tables. This partial deletion could be the main culprit- allowing me to access it and still run the installer. Perhaps not a typical situation, but may warrant investigation as to why 1/2 or more of a "deleted" site still exists.



#16 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 19 October 2008 - 09:04 AM

When a site doesn't exist, it loads the stuff from the main website :)

#17 vw53a

vw53a

    Likes Etomite Forums!

  • Member
  • PipPip
  • 393 posts

Posted 20 October 2008 - 10:57 AM

When a site doesn't exist, it loads the stuff from the main website :)

:D I'm imagining Dean gloating

For someone who claims to be not a PHP coder it looks like he's got all his bases covered well.
Congrats Dean.

#18 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 20 October 2008 - 11:05 AM

Thanks!

#19 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 20 October 2008 - 04:43 PM

Dean has been keeping very busy with the multi-site functionality... I can definitely see a niche such as cheap Etomite hosting services for this code... Considering how none of my clients maintain their own content I could even see myself using it in the future...

Great work, Dean... B)

#20 deadline

deadline

    Etomite Forum Fan

  • Member
  • Pip
  • 68 posts

Posted 22 October 2008 - 10:30 PM

Hello,

As of my understanding, the name given to this topic and its content should be "Etomite Multi-Installator" not "Multi-Site", since this later should deal with using an instance of etomite to administer (drive) multiple Etomite live websites.

Am I wrong ?
Anyway, great stuff... ;-)

deadline




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users