Possible to run other PHP versions with ns8-lamp

ns8-webserver allows you to set PHP versions on a per-virtualhost basis. But it looks like ns8-lamp doesn’t allow this at all, just running whatever’s latest (8.3.19). Have I missed this setting, or is it not present? Unfortunately, the concept of backwards compatibility seems foreign to the PHP devs.

yep it has not been implemented inside ns8-lamp, I basically depend on php-module of ubuntu24-04 for simplicity and it sticks on php83

What version of php do you need ?

I aimed something simple :smiley:

1 Like

7.4 would likely do for my application.

1 Like

well in that case php-fpm should be implemented, no ETA for now but it should be a nice feature

or less beautiful, I based the work on PPA for PHP : Ondřej Surý

in theory we could set php 7.4 to ns8-lamp/build-images.sh at 421f315eba5b8f4086bcadc09fb74a85c845e21c · stephdl/ns8-lamp · GitHub

But it is a fixed php version we could not change it on the fly

I think I am close of a solution, I am building the UI

@danb35 can you try and check if it answers to your need

add-module ghcr.io/stephdl/lamp:php74

php from 7.4 to 8.4 is covered

2 Likes

Is it possible to update my existing instance to this branch?

I tested the update but it didn’t work, maybe not yet fully implemented…
A fresh installation works.

<3>Module instance "lamp2" update failed with code 1
Assertion failed
  File "/var/lib/nethserver/cluster/actions/update-module/50update", line 158, in <module>
    agent.assert_exp(errors == 0)

not yet :smiley:

1 Like

something in log ?

I tested the direct install, does it works on you side ?

1 Like

Yes, direct install is working, phpinfo shows correctly the configured php version 7.4.

Update logs will follow…

2025-11-12T17:55:41+01:00 [1:lamp2:podman] 2025-11-12 17:55:41.912942514 +0100 CET m=+0.580801993 image pull 5b14f957e34dc847665e061057cc217603a6dcd250d568e552d42a4b40f4d488 ghcr.io/stephdl/lamp:php74
2025-11-12T17:55:41+01:00 [1:lamp2:agent@lamp2] podman pull
2025-11-12T17:55:41+01:00 [1:lamp2:agent@lamp2] Error: requires at least 1 arg(s), only received 0
2025-11-12T17:55:41+01:00 [1:lamp2:agent@lamp2]       ^^^^^^^^^^^^^^^^^^
2025-11-12T17:55:41+01:00 [1:lamp2:agent@lamp2]     ).check_returncode()
2025-11-12T17:55:41+01:00 [1:lamp2:agent@lamp2]   File "/usr/lib64/python3.11/subprocess.py", line 502, in check_returncode

I think some php image variable is missing…

1 Like

thank you, will check asap

1 Like
add-module ghcr.io/stephdl/lamp:php74

I think you can test the upgrade

3 Likes

Upgrade from 1.0.15 is working here.

4 Likes

released with 1.1.0

3 Likes

Updated, was able to set the vhost to PHP 7.4, and that solved the problem I was having with Meteotemplate. Thanks.

3 Likes