Hello all, I hope this is the right place to write about this. I've been
trying now for quite some time to integrate php into my non-apache server
(completely c++ written by me).
Sounds like you want to use sapi/embed (or write a SAPI implementation of your own which is notably more involved). Start with Wez's slides to get a general idea, if you have questions later on, you can ask here or on pecl-dev which is more non-core oriented than internals.