Skip to content
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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

Vedant-Gandhi
Copy link
Contributor

Description

The aim of this PR is to add support for including the Username, Password, Database and Unix Socket Path for Redis.

Type

  • New Feature

Reference Issue

Screenshots

Screenshot 2024-09-06 at 12 20 46

Testing

The code has been tested locally and is working as expected.

@Vedant-Gandhi Vedant-Gandhi marked this pull request as ready for review September 6, 2024 07:01
Comment on lines +279 to +282
'redis_unix_socket' => '',
'redis_database' => 0,
'redis_username' => '',
'redis_password' => '',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation

$data['redis_hostname'] = RT_WP_NGINX_HELPER_REDIS_HOSTNAME;
$data['redis_port'] = RT_WP_NGINX_HELPER_REDIS_PORT;
$data['redis_prefix'] = RT_WP_NGINX_HELPER_REDIS_PREFIX;
$data['redis_database'] = defined('RT_WP_NGINX_HELPER_REDIS_DATABASE') ? RT_WP_NGINX_HELPER_REDIS_DATABASE : 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation


$hostname = empty( $nginx_helper_admin->options['redis_unix_socket'] ) ? $nginx_helper_admin->options['redis_hostname'] : $nginx_helper_admin->options['redis_unix_socket'];
$port = empty( $nginx_helper_admin->options['redis_unix_socket'] ) ? $nginx_helper_admin->options['redis_port'] : 0;

$this->redis_object->connect(
Copy link

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

Copy link
Contributor Author

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?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@@ -22,6 +22,12 @@
'redis_hostname',
'redis_port',
'redis_prefix',
'redis_database',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation

</td>
</tr>
<tr>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation and use tabs instead of the space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants