Skip to content

Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions. #426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a
## Changelog ##

### 1.4.3-dev ###
* Bug fix: Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions [[426](https://github.com/pantheon-systems/wp-redis/pull/426)] (props @hj-collab)
* Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @timnolte)

### 1.4.2 (May 15, 2023) ###
Expand Down
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
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a
== Changelog ==

= 1.4.3-dev =
* Bug fix: Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions [[426](https://github.com/pantheon-systems/wp-redis/pull/426)] (props @hj-collab)
* Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @tnolte)

= 1.4.2 (May 15, 2023) =
Expand Down