From d6f84d9eabe6c9b30ff507855e747ddd0d0c1bb2 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 30 May 2023 08:43:31 -0600 Subject: [PATCH] Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions. copied from #425 --- object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index d2f3ced..e15f02d 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1261,7 +1261,7 @@ public function build_client_parameters( $redis_server ) { } } - if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection. + if ( strpos($redis_server['host'], 'unix:///') === 0 ) ) { // Unix socket connection. // port must be null or socket won't connect. $port = null; }