Page 1 of 1

C/C++ language on Apache http webserver.

Posted: Tue Dec 21, 2004 9:17 am
by eziekel2517
Why do I want C/C++ code on Apache? Because I need the code on the webserver to be unreadable to everybody including the administrator of the server.

The C/C++ code should be able to communicate via TCP/IP, and to interface to PHP. That is, the PHP script calls a C/C++ function/object which returns html data to the PHP script - is this possible?

Or can I achieve my goal in some other way?.

Yours sincerely
Claus Christiansen.

Posted: Tue Dec 21, 2004 10:24 am
by timvw
how unreadable is unreadable?

- what about reverse engineering?
- if nobody can read it, how would the machine be able to read/execute it?
- security through obscurity is not a good idea anyway

C/C++ compiled code would be sufficent.

Posted: Wed Dec 22, 2004 1:42 am
by eziekel2517
but is C/C++ code on Apache at all possible?.

yours sincerely
Claus Christiansen

Posted: Wed Dec 22, 2004 2:30 am
by timvw
there are so many options ;)

you can write your own apache module
you can use [php_man]exec[/php_man] / [php_man]system[/php_man] calls to start an external program
you can use http://pecl.php.net/package/ffi

Posted: Wed Dec 22, 2004 3:16 am
by onion2k
Alternatively, you could run PHP code through Zend Encoder (or one of the alternatives). Then noone could read your stuff. And it'd be much simpler than writing an Apache module.