Skip to content

Commit

Permalink
Connect via unix socket instead of filesystem to be compatible with p…
Browse files Browse the repository at this point in the history
…hp open_basedir restrictions.

copied from #425
  • Loading branch information
jazzsequence authored and pwtyler committed Jun 5, 2023
1 parent 69c194f commit d6f84d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d6f84d9

Please sign in to comment.