Php_screw Install using tutorial (another PHP code encryption implementation) _php instance

Source: Internet
Author: User

Before you begin, there are two things to clarify: first, support for open source is not equal to opposing code encryption; second, if you take something that is not your own (for example, a company) to open source, it should not be.

Previously known, PHP code encryption is the use of Zend Encoder, this thing is not only commercial software, as if also burst out of the problem can be cracked, so they found an alternative to the program ────php_screw, a Japanese development dongdong.

Php_screw is very compact and has not looked at its algorithm carefully, but from the documentation, you can change the seed itself, and then compile the so and executable files yourself. If it's enough, you can even change the algorithm yourself. Anyway, for us "ordinary people", this kind of encryption should be enough, if you really want to be watertight, it is still not public good, although the author said is not very easy to crack, but it does not mean where there are cattle?

Installation of the environment needs: Php5.x,zlib Open, Autoconf,automake has been installed.

Test environment: Ubuntu 8.04 Hardy, PHP 5.2.3.

Download Address: http://sourceforge.net/projects/php-screw/

1, decompression, change my_screw.h, inside a few numbers is seed, equivalent to the password, you can change, increase, and the number of numbers does not affect the speed of decryption.

2, compile so file:

Copy Code code as follows:

$ phpize
$./configure
$ make

If this error occurs, it is because the autoconf is not installed:
Copy Code code as follows:

$ make
Make: * * * No targets specified and no makefile found. Stop.

3, installation so file, compile the file in the modules directory, copy it to the location of the PHP extension storage, such as/usr/lib/php5/20060613+lfs, and then add in php.ini:
Copy Code code as follows:

Extension = php_screw.so

4. Compile the executable file used to encrypt the file:
Copy Code code as follows:

$ CD Tools
$ make

The newly generated screw in the tools directory is the one that can be invoked in $path, such as encrypting a file:
Copy Code code as follows:

$ screw a.php
Success crypting (a.php)

The encrypted a.php performs properly, while screw also renames the file that was not previously encrypted as a backup. screw file.

Update @ 2008-09-01

After encryption, there is a small problem, the use of require or include reference in the Include_path under the encryption code, as the clear text, the solution has two ways:

Using an absolute path reference to the encrypted content under the include_path, if it is their own host, certainly no problem;
Use relative paths to refer to, such as in the subdirectory of this project, which is fine.

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.