Intro
I am trying to protect PHP source code from being "easily" read by others, as part of a client requirement.
The thing is, I have tried lot of alternatives:
1) bcompiler: with the intention to transform php source to bytecodes, but no success.
2)phc: imposible to make/install.
3)BLENC extension: I have problems integrating it with a Yii Framework App.
The Idea
I was thinking that "maybe" I can "stay" between ApacheServer and PHP, in order to do something like this ...
1) HTTP request comes to APACHE SERVER
2) APACHE checks its a php file
3) According to the URL I know those php files are zipped/encoded, so before APACHE parses them, I unzip/decode the files
4) APACHE parses and process PHP.
5) zip/encode the files again (for protection).
6) Return a result.
Performance is not a concern
Is this posible?
Any suggestion?
EDITED:
1) FYI: The server where my php web app runs, is not a hosting, its my client server, so people has access to it.
2) FYI: Right now I found a temporary solution, called, SourceGuardian (http://www.sourceguardian.com/)
After trying BCompiler (imposible to use with PHP 5.4+) , PHC (imposible to compile),Monas (OLD deprecated), BLENC (not thinked for web applications with tons of files different than php files), etc. etc. etc., trying to "HIDE" my PHP Source code, SourceGuardian was the only think that worked for me, its commercial, but costs 199 dollards, its very affordable. I recommend everybody to try it.
--> (I will keep looking foward to Apache Modules) <--