This topic is locked
[SOLVED]

 install app multiple times for different clients

1/20/2014 5:06:58 PM
PHPRunner General questions
W
wfcentral author

I am building an app that I will resell to businesses. For example - a car sales application.
I want to install it on my site (example: www.car-sales-app.com) and then give each client their own folder.
www.car-sales-app.com/ford

www.car-sales-app.com/chevy

www.car-sales-app.com/BMW
Each client will have their own database and I will just copy the output folder to each of these folders.
From what I know...

  1. I will have to hack some file to get them each connecting to a separate database
  2. Because of the way phprunner handles sessions if you log in at /ford and you change the url to /chevy you are going to be logged in there as well.
    Is what I'm trying to do even possible?

admin 1/20/2014

Yes, this is possible.

  1. No need to hack anything. Connection settings can be changed in include/dbcommon.php file
  2. PHPRunner 7.0 creates a separate session for each project so sessions are not shared

W
wfcentral author 1/22/2014



Yes, this is possible.

  1. No need to hack anything. Connection settings can be changed in include/dbcommon.php file
  2. PHPRunner 7.0 creates a separate session for each project so sessions are not shared


For anyone else trying this... let me add some more info now that I have tried this.
In the dbcommon.php file you also need to change the session value for each folder you install your project to.
So, here is an example. Let's say I have created a webapp called "Car Lot" and I want to rent it out to 4 local dealers.
I host it on my site www.carlot.com and create a folder for each one.
I copy the output folder up to my server and put it in four different folders.
/BMW

/Ford

/Chevy

/Porsche
Now, I need to make sure the database values in dbcommon.php are changed to the database for that client.
Also, I need to give each one a unique session value (also found in dbcommon.php). If I don't do this... then, you can log in at /BMW and just change the URL to /Ford and you are still logged in.