1.進入/usr/local/php_screw-1.3目錄開始安裝
cd /usr/local/php_screw-1.3
phpize
./confiugre
3.設置自己用來加密的密碼
vi my_screw.h
-- Please change the encryption SEED key (pm9screw_mycryptkey) into the
values according to what you like.
The encryption will be harder to break, if you add more values to the
encryption SEED array. However, the size of the SEED is unrelated to
the time of the decrypt processing.
* If you can read and understand the source code, to modify an original
encryption logic will be possible. But in general, this should not
be necessary.
OPTIONAL: Encrypted scripts get a stamp added to the beginning of the
file. If you like, you may change this stamp defined by
PM9SCREW and PM9SCREW_LEN in php_screw.h. PM9SCREW_LEN must
be less than or equal to the size of PM9SCREW.
4.編譯
make
5.拷貝modules目錄下的php_screw.so文件到/usr/lib/php/extension目錄下
cp modules/php_screw.so /usr/lib/php/extension/
6.編輯php.ini文件
在php.ini文件裡,加入如下語句
extension=php_screw.so
7.重新啟動Apache
/etc/rc.d/rc.httpd restart
8.編譯加密工具
cd tools
make
9.將tools目錄下加密用的工具screw拷貝到適當目錄
cp screw /usr/bin/