diff --git a/src/Admin_Tools_Command.php b/src/Admin_Tools_Command.php index a8eec72..0754125 100644 --- a/src/Admin_Tools_Command.php +++ b/src/Admin_Tools_Command.php @@ -85,6 +85,13 @@ private function install() { if ( ! is_file( $index_file ) || file_get_contents( $index_file ) !== $index ) { $this->fs->dumpFile( $index_file, $index ); } + + // A phpRedisAdmin config written by an older release lacks allow_no_auth, which pra 1.27.0+ needs to serve. + $pra_config_file = ADMIN_TOOL_DIR . '/pra/includes/config.inc.php'; + $pra_config = file_get_contents( ADMIN_TEMPLATE_ROOT . '/pra.config.mustache' ); + if ( is_file( $pra_config_file ) && file_get_contents( $pra_config_file ) !== $pra_config ) { + $this->fs->dumpFile( $pra_config_file, $pra_config ); + } } /** diff --git a/templates/pra.config.mustache b/templates/pra.config.mustache index eafcec6..610952c 100644 --- a/templates/pra.config.mustache +++ b/templates/pra.config.mustache @@ -11,6 +11,9 @@ if (!empty($admin_user)) { 'password' => $admin_pass, ), ); +} else { + // phpRedisAdmin 1.27.0+ refuses to run without a login; /ee-admin/ is already behind EasyEngine's admin-tools basic auth. + $config['allow_no_auth'] = true; } $config['servers'] = array();