Giter VIP home page Giter VIP logo

Comments (8)

tyranron avatar tyranron commented on May 25, 2024

Tested it out with different scripts. Actually phpdbg works well, it only fails on kahlan binary.

Further investigation showed that the problem is in first line:

#!/usr/bin/env php

Removing this line stops phpdbg to segfault.

from docker-image.

tyranron avatar tyranron commented on May 25, 2024

Need to think about better workaround for phpdbg.

Also, @jails , maybe this can be "fixed" somehow in upstream? It's not relevant only to Docker images and will fail directly on Linux too.
I'm talking about this command:

phpdbg -qrr kahlan --help

I undestand that it's rather phpdbg issue than kahlan.

from docker-image.

jails avatar jails commented on May 25, 2024

Yeah unfortunately I already noticed that phpdbg is not very stable. Unfortunately with my local configuration:

phpdbg 0.5.0
PHP 7.0.13-1+deb.sury.org~xenial+1, Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.13-1+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies

I'm not seeing any segfault, so it's hard to investigate.

from docker-image.

tyranron avatar tyranron commented on May 25, 2024

@jails the problem is definitely in the first "magic" line. This worked earlier well and broke with latest PHP update. When I removing this line, everything works great.

You can try to play with newer PHP versions in official PHP Docker images.

I see 2 options here:

  1. Just remove this line in upstream Kahlan repo. But what it can lead to?
  2. I write a little hack in Dockerfile that will make phpdbg use a copy of bin/kahlan without first line.

from docker-image.

jails avatar jails commented on May 25, 2024

The php binary can be located in different locations according to different OS (/bin, /usr/bin, some ios paths, etc...). So the "magic line" is the standard way to get the correct location. It's something kidda standard.

However if the simple script:

#!/usr/bin/env php
<?php

echo "Hello World";

is segfaulting with phpdbg, maybe we can report the bug at https://bugs.php.net/ ?

from docker-image.

tyranron avatar tyranron commented on May 25, 2024

@jails sure, but those things take time 😟

Okay. Then I'll do an option 2 and report phpdbg bug additionally.

from docker-image.

jails avatar jails commented on May 25, 2024

Just had to run kahlan on windows with phpdbg and experienced the same issue.
Looks like the issue is related to phpdbg and is unpredictable so I wasn't able to create a minimal reproducible test case.
Btw by removing an unused use statement kahlan/kahlan@eba0e20, the segfault disappear.
So if this "fix" also solve the segfault on your side I think we can close this issue and hoping somebody will nail it down in phpdbg when a more popular framework will be concerned.

from docker-image.

tyranron avatar tyranron commented on May 25, 2024

@jails thank you for taking care.

For 2.5 version I did an in-place patch.

from docker-image.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.