Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All the images use PHP 7.4 #182

Open
JensRoland opened this issue Oct 28, 2024 · 2 comments
Open

All the images use PHP 7.4 #182

JensRoland opened this issue Oct 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@JensRoland
Copy link

JensRoland commented Oct 28, 2024

I must be doing something wrong -- I am trying to use an OLS docker image as a local Mac M1 dev environment for a PHP 8.2 / 8.3 web app, but no matter how I build it, I end up with only PHP 7.4.

My understanding was that this should give me a PHP 8.3 container?

FROM ghcr.io/ndigitals/openlitespeed:lsphp83

My plan was to run this Dockerfile and mount my application source dir like so:

docker run -it -p 8080:80 -v ./app:/var/www/vhosts/localhost/html mydevcontainer

This does start and it points to my code on localhost:8080, but it gives me a vhost with PHP 7.4, so my app throws errors.

If I instead map the ports to the Example vhost:

docker run -it -p 8080:8088 mydevcontainer

Now, if I open localhost:8080 I get the OLS Congratulations page, but if I click on the PHP link, once again I get a phpinfo screen for PHP 7.4.

I have tried editing the httpd_config.conf files and copying them in from the Dockerfile. The path property seemed promising:

extProcessor lsphp{
    type                            lsapi 
    address                         uds://tmp/lshttpd/lsphp.sock 
    maxConns                        10 
    env                             PHP_LSAPI_CHILDREN=10
    env                             LSAPI_AVOID_FORK=200M
    initTimeout                     60 
    retryTimeout                    0 
    persistConn                     1 
    pcKeepAliveTimeout
    respBuffer                      0 
    autoStart                       1 
    path                            lsphp74/bin/lsphp
    backlog                         100 
    instances                       1 
    priority                        0 
    memSoftLimit                    0
    memHardLimit                    0
    procSoftLimit                   1400 
    procHardLimit                   1500 
}

but changing it to lsphp83/bin/lsphp doesn't seem to make any difference.

It seems to me I'm simply misunderstanding something simple here?

@timnolte
Copy link
Member

Hmm, that tag should be giving you a PHP 8.3 image...I know that I am currently running a PHP 8.1 image.

I'll have to do some testing to confirm. The images are built using the OLS binary packages and then PHP from source so they should be running the correct version of PHP.

@timnolte timnolte self-assigned this Oct 28, 2024
@timnolte timnolte added the bug Something isn't working label Oct 28, 2024
@timnolte
Copy link
Member

@JensRoland OK, I have confirmed that the image essentially has both PHP 7.4 and PHP 8.3, basically this is due to the fact that PHP 7.4 is installed by default. The default OLS configuration is hardwired for PHP 7.4 and isn't getting updated to PHP 8.3. See below for a temporary fix.

If you login to the OLD web admin console and go to the "Server Configuration"->"External App" screen.

image

Then edit the "LiteSpeed SAPI App" configuration.

image

You can Edit the "Command" line to use lsphp83/bin/lsphp and then the default will be PHP 8.3.

@ndigitals ndigitals deleted a comment Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants