For a client I need a patched 7.4 version. The default 8.4 is not working for them and crashes WP.
I did the following:
- I deinstalled all php packages to get rid of the standard Trixi versions
- I reinstalled 8.4 packages, now all sury packages
- I additionally installed same 7.4 packages obviously from sury too
I added:
Code: /etc/liveconfig/lua.d/php74.lua
-- register additional PHP interpreter with LiveConfig
LC.web.addPHP( {
['id'] = 'php74',
['cli'] = '/usr/bin/php7.4',
['cgi'] = '/usr/bin/php7.4-cgi',
['fpm'] = {
['bin'] = '/usr/sbin/php-fpm7.4',
['start'] = 'systemctl start php7.4-fpm',
['stop'] = 'systemctl stop php7.4-fpm',
['reload'] = 'systemctl reload php7.4-fpm',
['pool'] = '/etc/php/7.4/fpm/pool.d',
['sockets'] = '/var/run/php74-fpm'
}
} )
Alles anzeigen
Code: /etc/liveconfig/lua.d/php84.lua
-- register additional PHP interpreter with LiveConfig
LC.web.addPHP( {
['id'] = 'php84',
['cli'] = '/usr/bin/php8.4',
['cgi'] = '/usr/bin/php8.4-cgi',
['fpm'] = {
['bin'] = '/usr/sbin/php-fpm8.4',
['start'] = 'systemctl start php8.4-fpm',
['stop'] = 'systemctl stop php8.4-fpm',
['reload'] = 'systemctl reload php8.4-fpm',
['pool'] = '/etc/php/8.4/fpm/pool.d',
['sockets'] = '/var/run/php84-fpm'
}
} )
Alles anzeigen
Code: /etc/liveconfig/lua.d/php-default.lua
-- change PHP default version
LC.web.PHPDEFAULT = 'php84'
I then did the diagnostic:
Code: in a ssh session:
liveconfig --diag
Running Lua diagnostics...
[...]
[163760] [2026-10-25 13:03:06.526357] [ERR] [LUA] selected PHP default version 'php84' not found! Using 'php8'...
[...]
- PHP 8.4.27 [DEFAULT] (code='php8')
CGI/FastCGI: /usr/bin/php-cgi
FPM: /usr/sbin/php-fpm7.4
pool config: /etc/php/7.4/fpm/pool.d
default php.ini: /etc/php/8.4/cgi/php.ini
- default PHP CLI: /usr/bin/php
[...
Alles anzeigen
What I earlier experienced and reported about LC2 apparently repeats itself.
- the 84 lua file is explicitly rejected as not found! The file is there though:
Code: # ls -l /etc/liveconfig/lua.d/
-rw-r--r-- 1 root root 489 Oct 25 13:13 php74.lua
-rw-r--r-- 1 root root 489 Oct 25 12:25 php84.lua
-rw-r--r-- 1 root root 58 Oct 25 12:11 php-default.lua
- the php section of --diag does not list two separate version but mixes them up under the php8
- consequently the second PHP version cannot be switched to in the domain settings ( I made sure that the specific account permission was set).
Anticipating your question:
- Why did you explicitly define the php84?
That was because the same result and mix up took place without it. I had hopes that declaring both separately would overrule any default behavior based on the presupposition of Trixie default version. I wanted to force separation of the two versions in the --diag as work around.
My quesitons:
- What did I do wrong?
- Is this a bug? Can anyone reproduce it?
- Any other helpful suggestions?