Install PHP-Screw 1.5 on openSUSE

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

wget -O php_screw-1.5.tar.gz

tar -zxvf php_screw-1.5.tar.gz
cd php_screw-1.5

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

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/ /usr/lib64/php5/extensions/

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

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

5. Compile encryption utility

cd tools/
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.