PHP Warning: Module 'redis' already loaded in Unknown on line 0

Operating System & Version
CentOS 7
cPanel & WHM Version
100.0.5

Rockforduk

Well-Known Member
May 5, 2016
55
6
58
London
cPanel Access Level
Root Administrator
Hi Everyone,
I for love no money can find out why this is still happening it is filling up error logs like nothing

[03-Dec-2021 13:40:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:41:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:41:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:42:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:42:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:43:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:43:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:44:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:44:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:45:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:45:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:46:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:46:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:47:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:47:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:48:01 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0
[03-Dec-2021 13:48:02 UTC] PHP Warning: Module 'redis' already loaded in Unknown on line 0

grep redis -R /opt/cpanel/ea-php74/root/etc
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:; Enable redis extension module
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:; extension = redis.so
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:; phpredis can be used to store PHP sessions.
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;session.save_handler = redis
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.algorithm = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.auth = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.autorehash = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.connecttimeout = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.consistent = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.distributor = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.functions = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.hosts = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.index = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.lazyconnect = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.names = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.pconnect = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.previous = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.readtimeout = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.arrays.retryinterval = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.auth = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.cache_slots = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.persistent = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.read_timeout = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.seeds = ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.clusters.timeout = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.pconnect.pooling_enabled = 1
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.pconnect.connection_limit = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.pconnect.echo_check_liveness = 1
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.pconnect.pool_pattern => ''
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.session.lock_expire = 0
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.session.lock_retries = 10
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.session.lock_wait_time = 2000
/opt/cpanel/ea-php74/root/etc/php.d/50-redis.ini:;redis.session.locking_enabled = 0

Not sure what i am missing to resolve this? Any recommendations would be much appreciated.

Thanks

Rockforduk
 

quietFinn

Well-Known Member
Feb 4, 2006
1,668
341
438
Finland
cPanel Access Level
Root Administrator
I've seen those errors several times and usually it's caused by a line in some user's php.ini file, but Apache error log doesn't tell the user.
There is no referer in any of those error lines?
 
  • Like
Reactions: Rockforduk

Damian

Well-Known Member
Oct 1, 2001
112
9
318
I am also seeing the same error repeated in the apache error_log.

Current cPanel (stable), CloudLinux CentOS7, EA-PHP74. No references to redis in ini files in the account. And it's not unique to this single account, it's occurring across all users.

Any suggestions on where to look?
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
917
342
63
EU
cPanel Access Level
Root Administrator
@Damian: do you see this under "php -v" via SSH as root? If yes you can do "php --ini" then based on the ini file path do:

grep -r redis /etc/path

to show if reference to redis is shown up there multiple times. Please paste here the outputs.
 

Damian

Well-Known Member
Oct 1, 2001
112
9
318
Thanks @andrew.n I didn't see it appear with php -v but after some digging around in /opt/cpanel/ea-php74/root/ I found two reference to redis.so

./etc/php.d/redis.ini:1:extension=redis.so
./etc/php.d/50-redis.ini:2:extension = redis.so

So I commented it out of 50-redis.ini and restarted apache.

I haven't seen the error since and redis appears to be working fine on the site that it was installed for. Now I need look into how to have each user (cPanel) have their own instance of redis to avoid collisions and potential security issues.
 
  • Like
Reactions: cPRex

andrew.n

Well-Known Member
Jun 9, 2020
917
342
63
EU
cPanel Access Level
Root Administrator
Good job. There are some Redis plugins out there which you can also try like the one from Unixy or this one:


though all seems to be quiet outdated :(
 

upsforum

Well-Known Member
Jul 27, 2005
474
0
166
stay away from this site (unixy.net), i bought two weeks ago, no links, no software, no answers, i opened dispute on paypal