| Author |
Message |
|
tanoinc
|
Post subject: software as a service (SAAS) Posted: Thu Jun 09, 2011 12:02 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
Dave, I want to host 1 install of PB on a domain, example, http://www.domain.com. I then want to create multiple companies. Thus company 1 log into the domain to access their books and company 2 logs into the same domain to access their books. How I conceive getting this to work is by changing the ‘select company’ to an input field on the login screen, maybe called COMPANY CODE. So, the company code then determines to which database the user connects. Username: user1 Password: userpassword Company: 12345 (*not a dropdown – user must input code*) This will log the user into the specific company determined by that code. At the same time a user from a different company, goes to the same domain but use their company credentials: Username: anotheruser1 Password: thisisthepassword Company: 56789 In doing this, PB will be exposed to more businesses and can be hosted as a service (SAAS), without companies having to host it on their own servers or even their own domains. One of the biggest benefits of this will be centralised updates. So if you have 10 different companies, you only need to update 1 installation… I suspect this is most probably the “biggest” wishlist request to date… Nino
|
|
 |
|
 |
|
alvin
|
Post subject: Re: software as a service (SAAS) Posted: Thu Jun 09, 2011 6:12 pm |
|
Joined: Wed Nov 21, 2007 10:30 am Posts: 569
|
|
I thought about a canned solution myself.
You could take your domain and create sub domains for each business. That way if something broke you would only have one business down... and when the business is gone just delete the sub domain, makes back ups and house keeping much easer. You could automate system updates easy enough.
You could offer your canned solution as one of the services you offer in your Phreedom Consulting Company. Could be a way to get some dev money...
_________________ Alvin
|
|
 |
|
 |
|
dave
|
Post subject: Re: software as a service (SAAS) Posted: Sat Jun 11, 2011 5:58 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Perhaps the easiest way to do this would be to have your users specify the company name in a _GET variable in the login or passed from a user specific page. This way you could pre-determine which company the user connect to and remove the company selection from the login page. You can do this with language. Another alternative (if you have a pre-login page) is to set the session variables from a user page and pass directly to the Phreedom main page. It's would take a little work to set up but not that difficult.
Dave
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: software as a service (SAAS) Posted: Mon Jun 13, 2011 1:33 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
@ Alvin I thought of the sub-domain route, but it still leaves me with the issue of updating each company when there are new updates for PB. The idea is to have 1 installation, but somehow different databases that determines the company. For the record, I don’t have a PB Consulting Company, but I own an ISP and try and introduce various opensource solutions to Small Businesses. I appreciate the hard work that Dave put into this and I am hopeful that the more people I introduce to PB, the bigger the chance are of Dave getting more donations or even paid support.
@ Dave I’m lucky to have access to a php developer, as I am still in training. I’ll pass your comments to him and hopefully he will be able to craft around it. If this works, I will post back… (hopefully soon)
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: software as a service (SAAS) Posted: Fri Jul 15, 2011 7:17 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Hi everyone,
I hooked up with someone who knows a little about php and asked him to have a look at this. I also gave him the suggestion made by Dave, but he came up with the following:
- Have the code in the cofig file define('dbname_CODE','CODE');
- In the load_company_dropdown() function where the session for companies is set, replace the key in the foreach used to set the $_SESSION['companies'][$key] with the code.
- So the login page will just replace the company dropdown with the html_input_field('company_code', $_POST['company_code']) and in the pre_process file under the validate action line 36 will replace $admin_company = $_SESSION['companies'][$_POST['company']]; the[$_POST['company'] with the [$_POST['company_code'] then everything will continue as normal.
This is a little to far fetch for me and my knowledge of php. Hopefully someone on th forum see this post and can work on trying the solution proposed.
Regards,
|
|
 |
|
 |
|
porteast
|
Post subject: Re: software as a service (SAAS) Posted: Fri Jul 15, 2011 7:47 am |
|
Joined: Wed Jan 28, 2009 2:59 am Posts: 123
|
|
Hi tanoinc, Your "pm" is disabled, I therefore cannot answer your pm to me.
JC
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: software as a service (SAAS) Posted: Fri Jul 15, 2011 11:44 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
JC,
Sorry my mistake... I enabled it again.
|
|
 |
|
 |
|
sid4it
|
Post subject: Re: software as a service (SAAS) Posted: Thu Nov 24, 2011 7:36 am |
|
Joined: Thu Nov 24, 2011 7:32 am Posts: 2
|
|
Did any one try this yet?
Simple solution is to create sub domains and have multiple instances for each client. However - it might not be optimal solution.
Thanks Sudhi
Last edited by sid4it on Fri Nov 25, 2011 6:36 am, edited 1 time in total.
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: software as a service (SAAS) Posted: Thu Nov 24, 2011 11:57 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
Hi sid4it, Not yet... The guy who gave me the "code" above and who was going to help me out with the programming, had to pull out due to other responsibilities. Anyway, I know too little about php coding to even try his suggestion, so what I do now is host phreebooks on subdomains... example... I created www.domain.com and then do the following: www.phreebooks1.domain.comwww.phreebooks2.domain.comwww.phreebooks3.domain.com...etc... The problem I have with this, is when doing updates of Phreebooks. Currently I only have 3 people who host there phreebooks on my domain. So the phreebooks is obviously free, but they pay for the hosting. Doing updates on 3 instances is still ok, but I am thinking ahead and hence the reason for this post. Regards,
|
|
 |
|
 |
|
dave
|
Post subject: Re: software as a service (SAAS) Posted: Mon Nov 28, 2011 11:21 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
This may be more philosophical than instructive but I see two schools of thought. First, with separate installs, the updates need to be done one at a time but the user will be allowed to have say in when they are completed. This method is also more module friendly as you won't need to install all modules for all users. Second, by having a single install updates are easier as you only have a single install to update but all users need to update on your schedule. You will need to install all modules and methods and have them available to your users. Both methods have pros and cons.
A couple of ideas. 1. Create a user login screen and tie the username to a company database. You can them override the company pull down with the company tied to the user account through a session variable. 2. Have your users pass a company name in the url and limit the company pull down to a hidden variable. 3. Use the multiple subdomain approach. 4. Rewrite the login code and restrict users to being created by the host and use a db to assign users to companies. Like accounts where you login and only see your phreedom install.
Dave
|
|
 |
|
 |
|