DevelopmentsSystem Engineering

Install PHP-Screw 1.5 on openSUSE

1. Download & Prepare
cd /usr/local/src

wget -O php_screw-1.5.tar.gz http://downloads.sourceforge.net/project/php-screw/php-screw/1.5/php_screw-1.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fphp-screw%2F

tar -zxvf php_screw-1.5.tar.gz
cd php_screw-1.5
/usr/bin/phpize

2. Change encryption seed

vi my_screw.h
# change seed to your random value

3. Compile module

./configure --with-php-config=/usr/bin/php-config
make

If you get error with below message…
Comment out 124 & 133 lines those include CG(extended_info) = 1;  in php_screw.c
Then try compile again.

 php_screw-1.5/php_screw.c:133: error: ‘struct _zend_compiler_globals’ has no member named ‘extended_info’

4. Add module to php & restart

ls ./modules
cp modules/php_screw.so /usr/lib64/php5/extensions/

vi /etc/php5/conf.d/php_screw.ini
# insert below line
extension=php_screw.so

service apache2 restart
php -i | grep php_screw
# check module is activated

5. Compile encryption utility

cd tools/
make
cp screw /usr/local/bin

chmod 400 /usr/local/src/php_screw-1.5/my_screw.h

 

♦ Usage of encryption

cd /srv/www/htdocs
screw index.php

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.