Modifying PHP CGI/DSO module for custom purpose

From: Date: Fri, 09 Nov 2001 15:51:53 +0000
Subject: Modifying PHP CGI/DSO module for custom purpose
Groups: php.dev 
Request: Send a blank email to php-dev+get-69890@lists.php.net to get a copy of this message
Hi all, I'm new to this list, and just got subscribed under hint of Andrei Zmievski. So forgive me if my question may seem stupid. I'd like to modify PHP, so that when I request for a file with a particular extension, it will be preprocessed before being parsed (read: decrypted). I'm doing tests with the CGI version at first, and switch to DSO module later. I modified streams.c/.h so that on fopen of a file with a certain extension, a flag in stream structure marks it as encrypted. Next read and gets operations will process the buffer, if encryption flag is set. This approach doesn't work. But since I'm new to the way PHP processes scripts, I could have wrong the path. Do you know of any smarty approach to solve this problem? (keep the sources encrypted). I'd really want them to be unaccessible if not by using the modified php module. Let me specify that I'm aware of Zend Encoder, but I can't choose it due the fact that the cost is simply too much for what I want to do. Preprocessing input file would be sufficient for my application. Any advice will be greatly appreciated. Thanks for listening. Mirko

« previous php.dev (#69890) next »