[Original] with Php_screw for PHP encryption [original vomiting blood recommended]

Source: Internet
Author: User

1. Preface

PHP is a relatively popular software, the corresponding development of a lot of products. How to self-developed products to keep secret, protect the source code, is also a problem for everyone to consider. When you use host hosting or virtual host, it is a real problem. Now about the encryption PHP program, in addition to Zend Company's product products, others are unsatisfactory. Here I introduce to you an open source product, a lot of good PHP encryption software--php_screw.

His advantage is to use PHP's Zend engine, but also the code encryption, and the system platform does not have any relationship, solve the product placed in other places of secrecy issues.

2. Test environment:
Rehat9
php4.3.2
httpd-2.0.50
php_screw.1.2.1--: http://sourceforge.net/project/showfiles.php?group_id=52025

3. Install the Software:
3.1. Install Apache:
# tar ZXVF httpd-2.0.49.tar.gz
# CD httpd-2.0.49
#./configure--prefix=/opt/apache--enable-so
# make
# make Install

3.2 Installing PHP:

# tar ZXVF php-4.3.2.tar.gz
# CD php-4.3.2
#./configure--prefix=/opt/php--with-zlib
--with-apxs2=/opt/apache/bin/apxs--disable-xml
--with-config-file-path=/opt/php/etc/php.ini
--disable-rpath--without-pear
(Note: Be sure to add--with-zlib this parameter)
# make
# make Install
# MKDIR/USR/LOCAL/PHP/ETC
# Cp/home/peng/php-4.3.2/etc/php.ini-disk/usr/local/php/etc/php.ini/php.ini
# Vi/usr/local/php/etc/php.ini/php.ini

Change: Register_global =off to Register_global =onaddtype
End add: zend_extension= "/opt/php/lib/php/php_screw.so"

3.3, Installation Php_screw:

# tar ZXVF php_screw.1.2.1.tar.gz
# CD php_screw.1.2.1
#/opt/php/bin/phpize
#./configure--with-php-config=/opt/php/bin/php-config
# VI My_screw.h
-------Note: This is the password file, the user set the encrypted password
# make
-------The role of make is to generate the php_screw.so file, which is used by PHP to interpret the encrypted PHP file, and the resulting file is in the./modules directory.

# CP./modules/php_screw.so/usr/local/php/lib/php
# CD Tools
# make
--------Note: Make generates screw this executable file, which is used to encrypt PHP files and generate encrypted. php files.

3.4 Encrypting files:

This encrypted file is the screw file generated by the make command in the previous step to generate the new encrypted file.
Example: Encrypting a/opt/php/htdocs/index.htm file
#./screw/opt/php/htdocs/index.htm
The program generates an encrypted file called index.php, and the original encrypted file is automatically backed up into Index.php.screw.
After encrypting the files that the product wants to encrypt, delete the backup files.

Back up the php_screw.so and screw files and continue to use them for encryption and interpretation later. Finally, delete the Php_screw directory.

3.5 Summary:

For php_screw This software, both in terms of speed and confidentiality, people feel very good. But the only disadvantage is that HTTPD2 's threading mechanism is not supported yet. This means that when compiling httpd2.50, you cannot use--with-mpm=worker parameters. There is no problem with support in the apache1.x version.

Statement:
When writing articles, it is inevitable to refer to a lot of netizens information, if there is similar, not necessarily purely coincidental.
In the spirit of freedom, sharing, the netizen can be arbitrarily posted, please indicate the author, source.

[Original] with Php_screw for PHP encryption [original vomiting blood recommended]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.