lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

xdebug.so is missing on php8.1 #164

Closed chauve-dev closed 2 years ago

chauve-dev commented 2 years ago

We currently use lando with platform.sh.

When we create a new project with php8.1 (php8.0 also affected) at startup it start to dump errors (the errors create files in the web root) image

The errors : PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/lib/php/20210902-zts/xdebug.so (/usr/lib/php/20210902-zts/xdebug.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902-zts/xdebug.so.so (/usr/lib/php/20210902-zts/xdebug.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

if i do a lando ssh i can see that the xdebug.so is really missing

If i do the same conf but in php7.4 everything works with xdebug too.

this bug seem to happen with newrelic extension too

here's the config : .platform.app.yaml :

name: 'test'
type: 'php:8.1'

variables:
    env:
        N_PREFIX: /app/.global

runtime:
    extensions:
        - xdebug
    xdebug:
        idekey: PHPSTORM

dependencies:
    php:
        composer/composer: '^2'
    nodejs:
        n: "*"

disk: 2048

build:
    flavor: 'composer'

hooks:
    build: |
        echo 'build'
        set -e
        curl -fsS https://platform.sh/cli/installer | php
        n auto
        hash -r
    deploy: |
        echo 'deploy'
    post_deploy: |
        echo 'post deploy'
        set -e

web:
    locations:
        '/':
            root: 'public'
            passthru: '/index.php'

.lando.yml

name: test
recipe: platformsh
proxy:
  mailhog:
    - mail.lndo.site
config:
  composer_version: 2-latest
services:
  mailhog:
    type: mailhog
    hogfrom:
      - test

Lando version 3.6.4 Platform.sh CLI 3.79.8

chauve-dev commented 2 years ago

Also i should add that the platform.sh config works on platform.

And i can solve the problem by switching php 8.1 to 8.0 but newrelics doesn't work in neither of those versions

chauve-dev commented 2 years ago

Solved with ticket #163 the bug occur because lando use latest version of the platform docker instead of the stable one, you can solve it by setting it in your lando.yml

name: appname
recipe: platformsh
proxy:
  mailhog:
    - mail.lndo.site
config:
  composer_version: 2-latest
services:
  mailhog:
    type: mailhog
    hogfrom:
      - appname
  appname:
    overrides:
      image: docker.registry.platform.sh/php-8.1:stable