I am writing a web app in PHP, and it has come time to build an update system, one of the requirements is automatic updates, how should I do this?
I want to do it without a cron, so I’m going to have to check for updates when requests are made to the system, should I do this only when an admin, with significant privs, logs-in, I think this is going to be the best but at least 1 client has said they don’t want this because they only intend to login every few month, and they still want to get the security updates.
Perhaps you can have a page on your site that returns a small XML file with the most current version number and a URL for download:
<xml> <version>1.x.y</version> <url>http://example.com/current.tgz </url> </xml>Then if the admin chooses to perform and upgrade, your application won’t need to know anything other than the URL to the XML file and the current version number.
Of course this is a very limited example upon which you can expand to your hearts content.