Jump to content

Upgrading Applications


bdmovies

Recommended Posts

Hello all,

 

I am getting ready to distribute my PHP app. However, I am *slightly* stumped on how to give people my upgrades.

 

Here is my theory so far.

 

In the config.php file list the macro/micro version number.

In the config table in the DB list the same

 

Upon login of an administrator query the DB and config.php file for the version #'s AND query my main server for the current UI version and DB version

 

If there is a mismatch w/ the DB and config #'s, something went horribly wrong, not sure how to deal w/ yet.

 

If the DB and config files match then check against the main servers numbers, if the user needs an upgrade, upgrade them.

 

Here is my problem: how can I download and overwrite the updates to my app (for instance pulling down a new home.php page) from INSIDE my app. Also, I need to make sure the schema for my DB is up to date (because people will try to jump from 1.0.1. to 1.4.2 or something stupid), so do I just put all of my DB changes in 1 file and just let it update the DB with the new version after every schema change and then just loop through until client's version number matches mine?

 

I hope that made sense...

Link to comment
Share on other sites

  • 3 weeks later...

Subversion won't work for what I need. While it will work for version control (If I can ever figure the frickin thing out) I need automatic upgrades for my users. Basically, an idiot proof way to upgrade - my clients will NOT be programmers, IT admins or anything like that.

 

I'm thinking a table in the DB which hold the DB version, UI version. When the user checks for an upgrade it checks the main server for the version of each. If there is a new UI, the app looks for a XML file on the main server which contains a list of the files that need to be updated and deleted. For each of the files that need updating, copy the file from main server, overwriting the old file. If the DB is newer, it will copy an upgradeDB file which gets appended for each new schema and just finds the user's current version, finds the next one and starts running the loop until it's up to date.

 

It makes sense, however, getting it to work is a WHOLE different ball game :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.