Cynogale combines:
- the Civetweb embeddable webserver
- the [BWA] embeddable PHP5 compiler
- the Sqlite 3 ebeddable database (optional)
...into a lighweight PHP5 webserver with an expiring key-value store and optional Sqlite database access
- serve static files
- similar to CGI, but PHP is compiled and executed inside a Civetweb thread worker
- $_GET, $_POST, $_SERVER, and $_HEADER provided on each request
- optional Sqlite3 support
- optional PHP script caching
- MIT license
- Civetweb
- [BWA] PHP like interpreter
- Sqlite 3 (optional - recommend using your distro's shared library and header)
- PHP5 support omits some PHP5 features, like preg_replace, DBO, and modules support
- uses threads and read-write locks extensively
- symlink include/civetweb.h, src/civetweb.c, and src/md5.inl to the Cynogale directory
- symlink bwa.h and bwa.c to the Cynogale directory
- if your distro/system doesn't have sqlite as a package, see below for instructions on how to create a shared libray
- optional - create and add BWA foreign function bindings (see main.c and sqlite.inl for an example)
- edit config.h to suit
- HOME base directory
- ROOT document root relative to HOME
- PORT listening port (see Civetweb docs for SSL and interface binding)
- NTHR number of worker threads for Civetweb
- IMPP import path for PHP scripts (require,etc)
- edit Makefile to suit - points of interest are -O3, -DUSE_SQLITE, and -DSCRIPT_CACHE
- make
- optionally, strip the executable and/or copy it somewhere in your PATH
- obtain the Sqlite3 amalagation
- gcc -O3 -c sqlite3.c
- ld -shared -o libsqlite3.so sqlite3.o
- cp sqlite3.h /usr/local/include
- cp libsqlite3.so /usr/local/lib
- add SSL options to Makefile and config.h
- possible ini-parser
- fix a few unguarded malloc calls
- investigate adding malloc guards to uthash
Cynogale provides all sources, and is therefore compilant with the Symisc Public License