Giter Club home page Giter Club logo

Comments (5)

gwharton avatar gwharton commented on May 20, 2024 1

OK, ive tried it using the config file instead of environment variables.

      array(
          'name'   => 'master.xxxx.xxxx.euw2.cache.amazonaws.com',
          'host'   => 'tls://master.xxxx.xxxx.euw2.cache.amazonaws.com:6379',
          'port'   => '',
          'filter' => '*',
          'scheme' => 'tcp',
          'path'   => '',
          'hide'   => false,
          'auth' => 'xxxx'
      )

This works and seems to connect to the redis server.

from phpredisadmin.

erikdubbelboer avatar erikdubbelboer commented on May 20, 2024 1

Great, I'll keep this task open for if one day I have time to improve support and fix that port logic.

from phpredisadmin.

erikdubbelboer avatar erikdubbelboer commented on May 20, 2024

In theory this is already possible. I don't have a setup to test. But I think you can set host to something like tls://hostname?ssl[verify_peer]=0 or tls://hostname?ssl[cafile]=private.pem&ssl[verify_peer]=1. Can you check if that works?

from phpredisadmin.

gwharton avatar gwharton commented on May 20, 2024

Ahh yes, it should work, but looking at the code, only if you do not set the port variable.

// Setup a connection to Redis.
if(isset($server['scheme']) && $server['scheme'] === 'unix' && $server['path']) {
$redis = new Predis\Client(array('scheme' => 'unix', 'path' => $server['path']));
} else {
$redis = !$server['port'] ? new Predis\Client($server['host']) : new Predis\Client('tcp://'.$server['host'].':'.$server['port']);
}

from phpredisadmin.

gwharton avatar gwharton commented on May 20, 2024

I tried not setting the port variable to see if I could use a full connection string, and alas the following code automatically sets the port setting if it doesn't exist.

if (empty($server_port)) {
$server_port = 6379;
}
$config['servers'][] = array(
'name' => $server_name,
'host' => $server_host,
'port' => $server_port,
'filter' => '*',
);

I'm guessing this only becomes an issue when setting the servers from environment variables, i.e in docker. I haven't been able to try this when setting the servers from config.inc.php which I suspect will work if you don't declare a port.

from phpredisadmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.