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

Your FrankenPHP binary version (1.0.3) may be incompatible with Octane #928

Open
tebbbb opened this issue Jul 17, 2024 · 5 comments
Open

Comments

@tebbbb
Copy link

tebbbb commented Jul 17, 2024

Octane Version

1.0.3

Laravel Version

11.8.0

PHP Version

8.3

What server type are you using?

FrankenPHP

Server Version

1.0.3

Database Driver & Version

No response

Description

Using the latest laravel version as of today.

WARN Your FrankenPHP binary version (1.0.3) may be incompatible with Octane.

Using FROM dunglas/frankenphp:1.0-php8.3

FROM dunglas/frankenphp:1.0-php8.3

ARG DOCKER_WWWGROUP
ARG DOCKER_WWWUSER
ARG NODE_VERSION=20
ARG APP_ENV

WORKDIR /var/www/html

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC

# Set timezone
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Update and install essential packages
RUN apt-get -y update --fix-missing && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends \
        apt-utils \
        apt-transport-https \
        curl \
        wget \
        nano \
        dialog \
        build-essential \
        git \
        gnupg2 \
        iputils-ping \
        libonig-dev \
        libsqlite3-dev \
        libsqlite3-0 \
        libzip-dev \
        libicu-dev \
        libxml2-dev \
        libxslt-dev \
        libssh2-1-dev \
        libssh2-1 \
        libcurl4-openssl-dev \
        pkg-config \
        openssl \
        zip \
        unzip \
        supervisor && \
    rm -rf /var/lib/apt/lists/*

# Install Node.js and Yarn
RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && \
    apt-get install -y --no-install-recommends nodejs && \
    npm install --global yarn && \
    rm -rf /var/lib/apt/lists/*

RUN pecl install xdebug

# Install PHP extensions
RUN install-php-extensions \
    pdo_sqlite \
    curl \
    zip \
    intl \
    mbstring \
    gettext \
    calendar \
    exif \
    pcntl \
    dom \
    xsl \
    simplexml \
    bcmath \
    sockets

# Clean up the image
RUN apt-get clean && apt-get autoremove -y

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Create user and group
RUN groupadd --gid 1000 $DOCKER_WWWGROUP && \
    useradd --uid 1000 --gid 1000 -m $DOCKER_WWWUSER && \
    chown 1000:1000 /var/log -R && chown 1000:1000 /var/run/ -R

# Switch to the new user
USER $DOCKER_WWWUSER

# Set the command to run frankenphp
ENTRYPOINT ["php", "artisan", "octane:frankenphp"]

Steps To Reproduce

see above

@tebbbb
Copy link
Author

tebbbb commented Jul 17, 2024

fixed it myself by using FROM dunglas/frankenphp:1.2.2-php8.3.9, but xdebug doesnt seem to work. Do i need to change anything for it to work? I can see it being enabled in phpinfo and the modes are also correct. Works with apache, just not with frankenphp

[xdebug]
xdebug.mode = debug,develop
xdebug.start_with_request = yes
xdebug.client_host = host.docker.internal
xdebug.client_port = 9003

@driesvints
Copy link
Member

@dunglas what's needed here?

@dunglas
Copy link
Contributor

dunglas commented Jul 23, 2024

This seems to be the same issue as dunglas/frankenphp#931 (comment)

Maybe should we add a special flag for XDebug?

@driesvints
Copy link
Member

@dunglas I'm not sure about the specifics needed for Octane but anything to above the above issue is welcome yeah.

@dunglas
Copy link
Contributor

dunglas commented Jul 23, 2024

Basically, we have to disable the worker mode and run in "normal" (CGI-like) mode when using Xdebug.

A feature that will allow us to use the worker mode with Xdebug is being developed by Xdebug, but in the meantime, it could be nice to add a flag to disable the worker mode. Something like artisan frankenphp:start --xdebug or --no-worker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants