No Code Attached Yet Information Required
avatar M-Falken
M-Falken
25 Sep 2025

With joomla 5.3.3

To setup the Redis cache configuration

My host is like : /home/******/.redis/redis.sock
So my port must be set to : 0

But, despite this code :

https://github.com/joomla/joomla-cms/blob/efb7789deb2ce55f5939b5adaa69d5626d7ee035/libraries/src/Session/SessionFactory.php#L101C1-L102C96

The Redis port still refused when we save the configuration.
Invalid field: Redis server port

Seems related to the fields behaviour

Thanks

avatar M-Falken M-Falken - open - 25 Sep 2025
avatar joomla-cms-bot joomla-cms-bot - change - 25 Sep 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Sep 2025
avatar M-Falken M-Falken - change - 25 Sep 2025
The description was changed
avatar M-Falken M-Falken - edited - 25 Sep 2025
avatar alikon
alikon - comment - 25 Sep 2025

can you try changing from

to min="0" instead ?

avatar QuyTon QuyTon - change - 30 Sep 2025
Labels Added: Information Required
avatar QuyTon QuyTon - labeled - 30 Sep 2025
avatar HLeithner
HLeithner - comment - 12 Oct 2025

When I read the code correctly, it doesn't matter what your port is in the configuration. It will automatically switched to 0 when you use an absolute path to the socked. My question is does it work and it's only cosmetic or doesn't it work at all to connect to the socket?

avatar M-Falken
M-Falken - comment - 15 Oct 2025

When I read the code correctly, it doesn't matter what your port is in the configuration. It will automatically switched to 0 when you use an absolute path to the socked. My question is does it work and it's only cosmetic or doesn't it work at all to connect to the socket?

This is not the subject, it is the field which refuses the "0" when we click on save the configuration, regardless of the port management behind.

@alikon I'll try min="0" asap thanks

avatar M-Falken
M-Falken - comment - 15 Oct 2025

@

can you try changing from

joomla-cms/administrator/components/com_config/forms/application.xml

Line 140 in efb7789
min="1"

to min="0" instead ?

it works, but we need to do it also for :

And all is fine

avatar alikon alikon - change - 2 Nov 2025
Status New ⇒ Closed
Closed_Date 0000-00-00 00:00:00 ⇒ 2025-11-02 08:59:31
Closed_By ⇒ alikon
avatar alikon alikon - close - 2 Nov 2025
avatar alikon
alikon - comment - 2 Nov 2025

please test #46396

avatar M-Falken
M-Falken - comment - 13 Aug 2026

Hi,

Following up on this with more context, since the issue was closed as "Information Required".

The root cause is now clear, and it's purely a UX/validation inconsistency, not a functional bug.

What already works correctly:
Both libraries/src/Session/SessionFactory.php and libraries/src/Cache/Storage/RedisStorage.php already auto-detect a Unix socket path and force the port to 0 internally, regardless of what's stored in the config:

$port = $host[0] === '/' ? 0 : $config->get('session_redis_server_port', 6379);

This was confirmed by @PhilETaylor in #36149 and documented in #26269 (work originally done in #18395). So for both sessions and cache, the port value entered in Global Configuration is effectively ignored when the host is a socket path. Any numeric value passes through and gets discarded.

What's still broken:
The admin form field (administrator/components/com_config/model/form/application.xml) still enforces min="1" on redis_server_port, for both the session field and the cache field. This means:

  • Users trying to literally set 0 (as several hosting providers explicitly document, e.g. PlanetHoster's n0c) get Invalid field: Redis server port and can't save.
  • There's no indication anywhere in the UI that the port is silently overridden/ignored when a socket path is used. Users have no way to know they don't need to fight with this field, and end up assuming Joomla is broken.

Suggested fixes (pick one or combine):

  1. Relax min="1" to min="0" on the port fields in application.xml, matching what several users have already had to patch manually on their own installs (this validation change alone was proposed as far back as #36149).
  2. Or, better, update the field description to clarify that the port is ignored/auto-set to 0 when the host is a socket path, so users stop trying to force 0 manually and understand why any value they enter works.

This has confused multiple users across several forums (PlanetHoster, DirectAdmin, the official Joomla community forum) over the years, with some resorting to manually patching application.xml on every update just to be able to save the config. A small documentation/validation fix here would save a lot of repeated confusion for shared hosting users relying on Redis sockets.

avatar M-Falken
M-Falken - comment - 13 Aug 2026

Hi,

Following up on this with more context, since the issue was closed as "Information Required".

The root cause is now clear, and it's purely a UX/validation inconsistency, not a functional bug.

What already works correctly:
Both libraries/src/Session/SessionFactory.php and libraries/src/Cache/Storage/RedisStorage.php already auto-detect a Unix socket path and force the port to 0 internally, regardless of what's stored in the config:

$port = $host[0] === '/' ? 0 : $config->get('session_redis_server_port', 6379);

This was confirmed by @PhilETaylor in #36149 and documented in #26269 (work originally done in #18395). So for both sessions and cache, the port value entered in Global Configuration is effectively ignored when the host is a socket path. Any numeric value passes through and gets discarded.

What's still broken:
The admin form field (administrator/components/com_config/model/form/application.xml) still enforces min="1" on redis_server_port, for both the session field and the cache field. This means:

  • Users trying to literally set 0 (as several hosting providers explicitly document, e.g. PlanetHoster's n0c) get Invalid field: Redis server port and can't save.
  • There's no indication anywhere in the UI that the port is silently overridden/ignored when a socket path is used. Users have no way to know they don't need to fight with this field, and end up assuming Joomla is broken.

Suggested fixes (pick one or combine):

  1. Relax min="1" to min="0" on the port fields in application.xml, matching what several users have already had to patch manually on their own installs (this validation change alone was proposed as far back as #36149).
  2. Or, better, update the field description to clarify that the port is ignored/auto-set to 0 when the host is a socket path, so users stop trying to force 0 manually and understand why any value they enter works.

This has confused multiple users across several forums (PlanetHoster, DirectAdmin, the official Joomla community forum) over the years, with some resorting to manually patching application.xml on every update just to be able to save the config. A small documentation/validation fix here would save a lot of repeated confusion for shared hosting users relying on Redis sockets.

In the meantime, as I was tired to patch each time, I've made a plugin to allow the save
https://github.com/M-Falken/plg_system_redisfieldfix/releases/tag/v1.0.0

avatar alikon
alikon - comment - 13 Aug 2026

maybe more easy to test #46396

avatar M-Falken
M-Falken - comment - 13 Aug 2026

maybe more easy to test #46396

already replied to this test so long time ago : #46162 (comment)

avatar M-Falken
M-Falken - comment - 13 Aug 2026

maybe more easy to test #46396

already replied to this test so long time ago : #46162 (comment)
And still wait for this fix to be applied to the 5.4.x branch and up

avatar alikon
alikon - comment - 13 Aug 2026

any pr needs 2 to human test before to become eligible for merge

avatar M-Falken
M-Falken - comment - 13 Aug 2026

so you and me :)

for such a simple modification...

avatar alikon
alikon - comment - 13 Aug 2026

no you and someone else cause the pr author cannot be a tester for his own pr

avatar M-Falken
M-Falken - comment - 13 Aug 2026

no you and someone else cause the pr author cannot be a tester for his own pr

yes I know...joke

Add a Comment

Login with GitHub to post a comment