Page 1 of 1

One script for everyone, or to each his own?

Posted: Tue Jun 06, 2006 8:40 am
by zeek
I have written a shopping cart application customized my clients' nitche industry. The php scripts will be the same for every web site that uses the cart (I host them all). My question is this:

Is it better to install one set of scripts on my server that all sites use, or to install a seperate set of scripts for each virtual account (user)?

I'd like to be able to use a single set of scripts, for easy upgrading, etc., but is there a disadvantage to this method?

Thanks in advance. NOTE: The application is just straight PHP/mySQL.

Posted: Tue Jun 06, 2006 8:54 am
by infolock
In this case, it's definately better to put it on your server and have them use it off your hosting. I built a shopping cart as well for my company, and that is how we host it for all 1200+ of our stations.

It just makes for easier debugging and also for easier management. If you spread those files everywhere, you will have a whole galaxy of issues, mainly having to update the exact same problem on every single machine you put your code on.

Posted: Tue Jun 06, 2006 10:04 am
by Christopher
For me it depends on whether the code is changing very much. If it is very stable then central is better. If it is part of a common application where upgrades will happen to all sites then common is better.

You can also have the both configurations if you have the search path set to "." and then "/path/to/common/libs" because it will find the local copy first if it exists and override the common files.

Thank you

Posted: Tue Jun 06, 2006 1:37 pm
by zeek
Thank you both for your replies. That's what I needed to know.

Posted: Tue Jun 06, 2006 1:48 pm
by PrObLeM
may i suggest symlinks to the file.