-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add Username, Password, Database and Unix Socket support. #352
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
55a5631
feat: add filter to set the cache path for nginx.
Vedant-Gandhi 367d97c
feat: add input element to accept redis database.
Vedant-Gandhi 14eca80
feat: add database while connecting to redis.
Vedant-Gandhi 8c58de3
feat: modify the redis database selection.
Vedant-Gandhi 2258c1a
feat: add acl support for redis.
Vedant-Gandhi e489543
feat: add unix socket.
Vedant-Gandhi c30a622
remove: extra filters.
Vedant-Gandhi efd7da4
feat: add password toggle button.
Vedant-Gandhi cd58a27
refactor: fix indentation.
Vedant-Gandhi 910b912
fix: bug causing the predis instance to crash if db was pre-selected.
Vedant-Gandhi 02db177
Merge branch 'develop' into feat/add-cache-path-filter
Vedant-Gandhi 9dea716
feat: add indentation for redis databse value.
Vedant-Gandhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my local setup, there’s no Nginx server or Redis installed. When I switch branches from master to your branch, the code throws a fatal error. The plugin is trying to connect, but the connection is being refused. If the plugin is attempting to make a connection, there should also be a fatal error in the master branch.
Please take a look into this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SH4LIN I am unable to replicate the issue on my end. Can you please share the error here if possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are throwing a fatal error when the Redis connection is refused, which is understandable. However, this makes the entire admin side inaccessible. As a result, there is no way to update the connection configuration except by manually updating the value in the database or using WP-CLI.
One solution is to wrap the
$this->redis_object->connect
inside try catch and on the catch display WP noticeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SH4LIN I found where the issue was and have fixed it. In predis it does not have checks for connection and instead immeditely executes the statement without checking if a connection is already established or not.
So in class-predis.php where we have addded selecting the databse feature, it was selecting the database without checking for connection establishment causing it to throw error.