Apache CGI and PHP-FPM support for OpenEMR Static Binaries for macOS, Linux and FreeBSD

Happy to share that I’ve completed adding support for running OpenEMR using a static distribution without Docker or any other dependencies using Apache with both CGI and PHP-FPM.

Each of the builds will create a MicroSFX self extracting archive, a PHP CLI binary, a PHP CGI binary, and a PHP FPM binary. Each build includes examples for running OpenEMR using Apache with both CGI and FPM and an example of running OpenEMR using the built in PHP development server in the PHP CLI binary.

Also for each build I’ve made releases with static binaries I compiled locally (on a MacBook Pro M5 with 32 GB of RAM and 1 TB disk) here in case folks don’t want to have to compile their own binaries: Releases · Jmevorach/openemr-static-binary-forge · GitHub

If anyone has any chance to benchmark the setups or independently reproduce the builds I’d greatly appreciate any feedback. My hope is that these builds can be good options for users operating in high performance settings where the efficiency and performance gains you get from using a statically compiled version of PHP (or something very close to it for the FreeBSD build which does contain some bundled libraries) and by running on bare metal without the need for virtualizing an OS with Docker will do some good.

Also the portability angle of all this is pretty exciting for me. We can run these distributions natively on macOS, Linux and FreeBSD based systems for multiple different CPU architectures or run them in virtualized environments as well.

The builds are customizable so we can modify the materials as we’d like to produce distributions for specific tags of OpenEMR (default is v7_0_4), specific versions of PHP (default is 8.5), and even make hardware specific optimizations to improve performance further when running on CPUs with access to specific instructions sets (i.e. AVX2).

Here’s links to the Apache examples (CGI + PHP-FPM) for each build: