Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brychanmd-31450021's avatar

Laravel Sail - port forwarding broken

I've installed a new project using laravel sail. I haven't done any customisations or adjustments to the docker file or anything else.

All the services are up and running but there seems to be an issue with the port forwarding for the actual php app service.

When I try to visit the app in the browser i see this message in the browser window: 'The connection was reset'

I have this message in the logs:

Failed to extract the request port. Ensure the log line contains a valid port: [Tue Dec 17 21:13:10 2024] PHP Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0

I am on apple macbook pro M1.

Any suggestions on what's wrong and how to fix?

1 like
2 replies
brychanmd-31450021's avatar

I resolved this by myself, I'm not sure what the problem was exactly, maybe a mismatch in composer packages, because I fixed it by removing the composer lock file and reinstalling everything, including sail, then rebuilding the containers with sail

colingmurney's avatar

The issue is happening when using the Sail PHP 8.4 runtime to build the container. My "solution" was to use PHP 8.3.

I brought down my containers: sail down

Updated docker-compose.yml:

    build:
        context: ./vendor/laravel/sail/runtimes/8.3
        dockerfile: Dockerfile
        args:
            WWWGROUP: '${WWWGROUP}'
    image: sail-8.3/app

And then rebuilt the containers: sail up

2 likes

Please or to participate in this conversation.