Cynogale combines:
- the Civetweb embeddable webserver
- the PH7 embeddable PHP5 compiler
- the uthash library
- 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
- built-in expiring key-value store based on uthash, supports persistent keys
- optional Sqlite3 support
- optional PHP script caching
- MIT license
- Civetweb
- PH7
- uthash
- Sqlite 3 (optional - recommend using your distro's shared library and header)
- Linux 2.6+ (tested on Debian 7 x86 w/ kernel 3.2)
- 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 ph7.h and ph7.c to the Cynogale directory
- copy or symlink uthash.h to the Cynogale directory, or make it available in the compiler search path
- 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 PH7 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
- Steven G. Messervey sgmesservey@gmx.com