Z
Z
zapimir2011-12-09 21:52:23
PHP
zapimir, 2011-12-09 21:52:23

Encryption filters in PHP, how common are they among hosters?

I wanted to use encryption filters for encryption in my backup script. It seems that the test script worked so well on a local computer on Windows (the data was compressed and encrypted on the fly), but there were no encryption filters on two working hostings, despite the fact that the mcrypt functions themselves work on them.
You can look for yourself

<?php
echo 'PHP ' . PHP_VERSION . ', mcrypt filter - <b>' . 
    (in_array('mcrypt.*', stream_get_filters()) ? 'found': 'not found') . '</b>';
?>

the script writes the php version, and whether or not the encryption filter is found.
I wonder if I'm so lucky, or are real encryption filters rarely installed on servers and you shouldn't use them.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
G
galaxy, 2011-12-12
@zapimir

php.net/ChangeLog-5.php#5.3.3

Added stream filter support to mcrypt extension (ported from mcrypt_filter). (stas)

A
Anton, 2011-12-09
@sHinE

PHP 5.2.42-servage24, mcrypt filter - not found
servage.net

W
WebSpider, 2011-12-09
@WebSpider

PHP 5.2.17, mcrypt filter - not found (Hostgator)

A
Anatoly, 2011-12-09
@taliban

PHP 5.3.3-7+squeeze3, mcrypt filter - found
vps

M
mariofag, 2011-12-10
@mariofag

[email protected]:~$ php test.php
PHP 5.3.3-7+squeeze3, mcrypt filter - found
Virtually free hosting, by the way %)

F
fozzy, 2011-12-10
@fozzy

PHP 5.3.8-pl0-gentoo, mcrypt filter - found

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question