2

I have a laravel application deployed on a kubernetes cluster when i try to use laravel tinker im getting below error after hitting enter for every command

ErrorException with message 'Undefined variable: status'

on my local machine there is no such problem at all

im stuck at debuggin this. how can i get error trace to find out where this is happening

Laravel 5.6 Psy Shell v0.9.12 (PHP 7.1.33 — cli)

Arash
  • 639
  • 2
  • 9
  • 15
  • There should be a full stack trace logged, tracking it down depends on how you have logging configured, but very possibly in storage/log/laravel.log or storage/log/laravel-2020-03-10.log ? – James Clark Mar 11 '20 at 21:40
  • @JamesClarkDeveloper my laravel logs works as expected , same about php-cli logs.the problem is this error is not logged in any of these places. – Arash Mar 12 '20 at 17:48

1 Answers1

1

After many hours digging in psysh source code, i found the problem.

i had some pcntl_xxx functions disabled in my php.ini file, removed them and everything works fine now.

by the way, for anyone interested the exact path of where this error happened :

in vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php file look for private function called createSavegame()

Arash
  • 639
  • 2
  • 9
  • 15
  • 2
    Thanks for the update! PsySH was checking whether `posix` and `pcntl` extensions were available before enabling the process forker, but it wasn't robust enough. I just pushed a change that checks not only that the extensions are enabled, but that none of the required functions are disabled. It'll be available in the next stable release! https://github.com/bobthecow/psysh/commit/bdfe05cbe4a229b0ebeadbad5b1af112df3d4068 – bobthecow Mar 15 '20 at 20:55