Giter Club home page Giter Club logo

Comments (8)

scil avatar scil commented on May 18, 2024

could you find more details?

use xdebug?

Or set 'tinker' => true, in fly.conf.php and add eval(tinker()) ?

from laravelfly.

aftabnaveed avatar aftabnaveed commented on May 18, 2024

I already have the xdebug enabled, otherwise PHP won't print the stack trace :)

@scil Where should I add eval(tinker()) ?

Thanks.

from laravelfly.

scil avatar scil commented on May 18, 2024

eval(tinker()) can be placed everywhere almost.

open https://github.com/scil/LaravelFly and click "tinker use examples.(🎃 click me!)",
there are some examples.

from laravelfly.

aftabnaveed avatar aftabnaveed commented on May 18, 2024

OK thanks, I figured it out and tried, but it would take me some time to use it properly. The error seems to be associated with a middleware. I will try to use xdebug to see the problem.

from laravelfly.

aftabnaveed avatar aftabnaveed commented on May 18, 2024

Ok I got a bit closer to the issue. I have a named middleware that I registered in App/Http/Kernel.php. The trouble is when it gets to the Line 152 of Illuminate\Pipeline\Pipeline it for some reason is not able to obtain its class thus causing the error.

My current application is perfectly working fine with default PHP-FPM setup.

 $response = method_exists($pipe, $this->method)
                                ? $pipe->{$this->method}(...$parameters)
                                : $pipe(...$parameters);

from laravelfly.

scil avatar scil commented on May 18, 2024

Can I read your middleware code?

or have you changed ``class Kernel extends HttpKernel ` in app/Http/Kernel.php like https://github.com/scil/LaravelFly/blob/master/doc/config.md ?

from laravelfly.

aftabnaveed avatar aftabnaveed commented on May 18, 2024

OK this code fixed the issue in App\Http\Kernel.php:

if (defined('LARAVELFLY_MODE')) {
    if (LARAVELFLY_MODE == 'Map') {
        class WhichKernel extends \LaravelFly\Map\Kernel { }
    }elseif (LARAVELFLY_MODE == 'Simple') {
        class WhichKernel extends \LaravelFly\Simple\Kernel { }
    } elseif (LARAVELFLY_MODE == 'FpmLike') {
        class WhichKernel extends HttpKernel{}
    } else {
        class WhichKernel extends \LaravelFly\Greedy\Kernel { }
    }
} else {
    class WhichKernel extends HttpKernel { }
}

Thanks

from laravelfly.

scil avatar scil commented on May 18, 2024

nice!

You can also define an new Kernel file only for LaravelFly and replace \App\Http\Kernel::class with its name in fly.conf.php

from laravelfly.

Related Issues (20)

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.