Hi All, how's everyone doin?
I'm thinking of developing a little something that will make it easier for me to update the PHP Scripts (or any other script) for my application..
I basically have a WAMP based software that's deployed to several different clients..
Every now and then, I fix a bug in the software and test it on my local dev server..and when all is good, I would then FTP to each client 1 by 1 to copy the new files onto their servers.. (well basically the whole application directory so that I'm sure not to miss anything) ...
Obviously this has become quote a hassle.. and realized I needed a more automated update system..
I am looking at a few strategies and would love to hear what my fellow php ninjas think..
STRATEGY B:
- Setup an FTP server online w/c hosts the latest (and greatest) project files/directory..
- Install an FTP sync tool on each client servers and have it run periodically ..
---> im not to keen about this because it has dependencies w/ FTP client and all that. and i don't feel secure leaving FTP passwords in client machines.
STRATEGY 2:
- Setup an HTTP server w/c hosts the latest (and greatest) project files/directory..
- program into my Application to send a list of files currently in its directory and send it along w/ the filesizes and date of modification of each file, to a "check_update.php" script on my Server..
- that check_update.php script will then compare that list w/ its own list and for any file that doesn't match, it then responds a list of files mismatched (these are the files to be updated)
- the client application will then contact another script "do_updates.php" and post a list of files it is request.. this script will then fopen all the files in the list and put them in an array, and send em all back in its reply..
---> i know this is a bit of a security issue where my php scripts and other files will be exposed to piracy if someone figures out this link , and the formats im using, BUT i will have the following measures in place
-----> 1) I have an API KEY for EACH client residing in an encrypted "key.ini" and that needs to match w/ what's securely recorded on my server
-----> 2) I have a mechanism in place where the "do_updates.php" file will reject any updates that fetches 50% or more of the files on the server (for massive updates I don't mind FTPING into my client's machines)
-----> 3) I'm actually using the latest IonCube encoding w/ licensing so , it wont really matter much if someone does get ahold of the complete project files/folder.
STRATEGY 3:
- perhaps there's already an existing solution for this kind of thing? lol
Interested to hear your thoughts guys...