• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Redis module for PHP 7.0.1 and 7.0.2

What exactly are the commands I should be using? Because I cannot install phpredis 3.0.0 using pecl.

Code:
/tmp/redis/common.h:3:43: fatal error: ext/standard/php_smart_string.h: No such file or directory
#include <ext/standard/php_smart_string.h>
                                           ^
compilation terminated.
make: *** [redis.lo] Error 1
ERROR: `make' failed

You'll need to install the follwing dev package:
Code:
apt-get install plesk-php70-dev

After this you have the tools available to compile succesfully
 
Hi mgsolidus,

which installs its own php70-dev
sorry, but your answer is really strange. The suggestion to solve your issue is to install "plesk-php70-devel"... do you really think, that another dev-package could be used, to solve issues with the mentioned "PLESK" - php - version? It's even the same, if you would say: I already installed the "plesk-php56-devel" - package. ;)
 
Install plesk-php70-devel package with yum.

Error: Package: plesk-php70-devel-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)
Requires: plesk-php70 = 7.0.9-centos7.16072211
Installed: plesk-php70-7.0.10-centos7.16090813.x86_64 (@PHP_7_0-dist)
plesk-php70 = 7.0.10-centos7.16090813
Available: plesk-php70-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)
plesk-php70 = 7.0.9-centos7.16072211
 
Hi mgsolidus,

pls. keep an eye on the following facst:

=> Installed: plesk-php70-7.0.10-centos7.16090813.x86_64 (@PHP_7_0-dist)
but
=> Available: plesk-php70-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)​

If you experience such issues, then this is mostly because of non-default repositories. Consider to use ( for CentOS 6.8 ), the solution provided by @IgorG :


From the forum thread: => Package plesk-php70-devel via yum for version 7.0.10 not available when plesk-php70 is at version 7.

HINT: Pls. adjust the provided URL with an URL for YOUR operating system!
 
Also, am I correct in thinking that I do not need the redis.so file attached in the original post now? Redis is listed under PHP extensions.
 
Hi mgsolidus,

Will this package update with regular PHP updates?
Yes, it will.

Also, am I correct in thinking that I do not need the redis.so file attached in the original post now? Redis is listed under PHP extensions.
Pls. check your existing "*.ini" - files at for example "/opt/plesk/php/7.0/etc/php.d/". If you already have an existing "*.ini" - file, which directs to the PHP - depending "*.so" - file, then there is certainly no need to include it a second time. ;)

You are always able to check your redis - integration with the additional "redis.php" file from the offered attachment ( Redis.zip ) at the start post - just follow the suggestions at point "d)" and "e)". ;)
 
I just tried installing the module as described in the original post. It seems like is is being loaded, however, I receive the following error when using the test file: "Redis server went away. Issues with the Redis key/value store occurred"

Afterwards, I tried compiling the module by myself:

Code:
cd /opt/plesk/php/7.0/include/php/ext
wget -O phpredis-php7.zip https://github.com/phpredis/phpredis/archive/php7.zip
unzip phpredis-php7.zip
rm -fv phpredis-php7.zip
cd phpredis-php7
/opt/plesk/php/7.0/bin/phpize
./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config
export CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
make
make install
ls -la /opt/plesk/php/7.0/lib64/php/modules/redis.so
/opt/plesk/php/7.0/bin/php -v
/opt/plesk/php/7.0/bin/php -i | grep redis
echo 'extension=redis.so' > /opt/plesk/php/7.0/etc/php.d/redis.ini
plesk bin php_handler --reread

Unfortunately, no makefile is created (only a makefile.global) after using /opt/plesk/php/7.0/bin/phpize ./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config export CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"

Could someone help me out?

EDIT: I missed a big point here: Installing the redis-server. Simply using apt-get install redis-server fixed the problem.
 
Last edited:
Updating to Plesk Onyx, will the manually added PHP Redis extension be working after the update? Or would we have re-configure redis using the one that comes with Plesk Onyx?
 
Updating to Plesk Onyx, will the manually added PHP Redis extension be working after the update? Or would we have re-configure redis using the one that comes with Plesk Onyx?
Yes, I suppose that re-complation module for current PHP version will be required.
 
Updating to Plesk Onyx, will the manually added PHP Redis extension be working after the update? Or would we have re-configure redis using the one that comes with Plesk Onyx?

It is not really that you need to recompile or use a more up-to-date redis extension: as long as Redis does not change drastically (and it did not), the "old" extension will do the trick.

However, there is one major problem when using the "old" extension: compatibility, when upgrading.

In essence, it is best to do the following in an upgrade process:

a) de-activate the "old" extension before starting the upgrade and note that

- all relevant files, entries and settings (related to the "old" extension) should be removed properly,
- it is a good idea to "backup" all those files and settings,

and the code responsible for connecting to Redis, existing in php scripts of specific applications and websites, can be left unchanged during upgrade,

b) upgrade to Onyx and activate the default (new) Redis extension,

and that is all, it should do the trick.

This way, you would prevent a conflict between two Redis extensions (the old and the new one), while adopting the new default package and hence preventing future compatibility issues.

Why bother? Well, technically there is no need to "mess with the extensions", as long as one leaves one of the extensions inactive.

Nevertheless, during upgrade, leaving the "old" extension active can lead to unpredictable outcomes, so I would recommend to follow the steps above.

Hope the above helps a bit.

Regards......
 
Edit of my post: Got PHP Redis compiled and working on CentOS 7 and Plesk 12.5.
Code:
yum update
yum install make plesk-php70-devel gcc glibc-devel zlib-devel
cd /opt/plesk/php/7.0/include/php/ext
wget -O phpredis-php7.zip https://github.com/phpredis/phpredis/archive/php7.zip
unzip phpredis-php7.zip
rm -fv phpredis-php7.zip
cd phpredis-php7
/opt/plesk/php/7.0/bin/phpize
./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config
export CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
make
make install
ls -la /opt/plesk/php/7.0/lib64/php/modules/redis.so
echo "extension=redis.so" >/opt/plesk/php/7.0/etc/php.d/redis.ini
/usr/local/psa/bin/php_handler --reread

I run the code above and everything went well, but there is something I am missing. Do I have to install something else, maybe the actual Redis Server?? I cant make magento store to use frontend page cachs
 
Back
Top