Search code examples
laravel-5.1laravel-artisan

The command line statement php artisan tinker isn't working


I am using laravel 5.1 and I am following a tutorial that I've followed before without any issues. But today when I ran

 php artisan tinker

I got the following error

 PsySH history file found at '/home/vagrant/.config/psysh_history'. Please delete it or move it to '/home/vagrant/.config/psysh/psysh_history'.

I have never seen this before and I have been looking for it but dont know where to locate it so can either delete it or remove it. Also another question I have is should I delete it or move it? I don't want to do something that inadvertantly crashes my app. Thanks in advance


Solution

  • So you don't have to answer and accept your own question:

    It looks like pshsy_history is a history file for the php debugger psysh, and your php command wants it in a different location from where it is. I'm guessing it was created the first time you followed the tutorial.

    I'm thinking it's safe to delete with rm /home/vagrant/.config/psysh_history since your php command seems like it's going to create a new one.

    If you want to be on the safe side then to move it like the error message says with mv /home/vagrant/.config/psysh_history /home/vagrant/.config/psysh/psysh_history

    If you want to double check the contents of the file before doing either, try head /home/vagrant/.config/psysh_history.