Reputation: 11286
Does anyone know of a framework (written in PHP) to update PHP-based software ?
I'm thinking of a library that assists in checking for updates online and that provides methods for generating, downloading, verifying and installing update packages, maybe even with encryption and public-key signatures.
Ideally with a non-copyleft open source license (e.g. BSD or MIT License, no GPL).
While source control tools are nice in theory, they can complicate (initial) deployment of PHP applications as they are not PHP-based (limits portability) and are often quite large.
Upvotes: 3
Views: 929
Reputation: 11286
I've developed my own solution now which provides functions for generating, verifying and installing update packages.
Basically, it uses PHP's OpenSSL functions for public-key encryption (RSA) of the key for symmetric encryption, mcrypt for symmetric encryption (AES) and ZIP as the container format. These building blocks are used to create compact update packages and ensure data integrity and authenticity.
One could also use openssl_pkcs7_sign()
and openssl_pkcs7_encrypt()
and their counterparts for MIME-compliant encryption, however these functions seem to use 7-bit encoding and therefore make archives rather large.
The web application must have all its files and system-independent data in a single application directory that can be replaced to upgrade the application.
Updating is performed as follows:
Extracting the ZIP archive contents to a temporary location
Version / source control systems such as git are nice when you are the one in control of all target systems but otherwise I think you should not require the customer to install and operate third-party software for which you would have to provide support as well but rather provide a user interface for software updates that integrates well with the rest of your software.
Upvotes: 3
Reputation: 3444
What about a software that uses the source control tool, like git to check for new updates and loads the newest commit?
Upvotes: 1