Download
Installation(参照压缩包内README.en)
(1) Unpack php\_screw-1.5.tgz.
(2) Customize encryption / decryption
vi my\_screw.h
change the stamp in php\_screw.h
Notice:PM9SCREW\_LEN must be less than or equal to the size of PM9SCREW.
(3) Execute the following command with directory php\_screw-1.5
phpize
./configure
(4) Compile the decryptor
make
(5) Copy modules/php\_screw.so into an extension directory.
cp modules/php\_screw.so /usr/lib/php/modules
(6) Add the next line to php.ini.
extension=php\_screw.so
(7) Restart the httpd daemon.
(8) Compile the encryption tool
cd tools
make
(9) Encrypting a PHP script
screw "Path to the PHP script to be encrypted"
遇到的问题
/opt/soft/php\_screw-1.5/php\_screw.c: In function ‘zm\_startup\_php\_screw':/opt/soft/php\_screw-1.5/php\_screw.c:124: 错误:‘zend\_compiler\_globals' 没有名为 ‘extended\_info' 的成员/opt/soft/php\_screw-1.5/php\_screw.c: In function ‘zm\_shutdown\_php\_screw':/opt/soft/php\_screw-1.5/php\_screw.c:133: 错误:‘zend\_compiler\_globals' 没有名为 ‘extended\_info' 的成员make: ** [php\_screw.lo] 错误 1*
解决方法: 需要修改php\_screw.c 把CG(extended\_info) = 1; 修改为:
CG(compiler\_options) |= ZEND\_COMPILE\_EXTENDED\_INFO;
~~~~~~~~~~~~~~~~
archlinux未遇到此错误
/root/php\_screw-1.5/php\_screw.c: In function ‘pm9screw\_compile\_file':解决方法:
需要修改php\_screw.c
把第78,84,93行的org\_compile\_file(file\_handle, type);
修改为:
org\_compile\_file(file\_handle, type TSRMLS\_CC);
然后再make就成功了。
其他加密方法