Ask HN: Is there a simple installer file for PHP software?
If there is nothing like this, I'll probably write and release it for our software, but it could work for any software.
The background to this is that PHP powers 80% of web sites, and there is a huge number of commodity hosting solutions out there.
Basically, this would be a single PHP file that people would download and install on their favorite commodity host. Upon launch, it would
1. Look at some hardcoded index of https URLs
2. Download a zip file and check the signed hash
3. If the signatures check out (There would be a minimum # of signatures required) then unzip it
4. Change the file permissions and run installer
It would have a Web interface and a CLI interface.
I just haven't seen anything that's a single PHP file download. It seems like the easiest distribution model for commodity hosts which regular joes use.
5 comments
[ 3.4 ms ] story [ 26.5 ms ] threadhttps://getcomposer.org/download/
* I think in typical use, Composer is installing via Packagist.org, which is typically pointed at a GitHub repo, and it is the repo's zip file that is downloaded to your computer. You can look in composer.lock and see `"type": "zip"` throughout
* It definitely has some sort of hash verification in the PostFileDownloadEvent class. I've never used it to know if it would satisfy your need
Similarly, WP CLI is a .phar file which can then install additional packages. It's really just using Composer under the hood.
php file.phar
More info : https://www.php.net/manual/en/phar.using.intro.php