2

How to change the directory psysh is starting from? It seems to be starting from /var/www/html because any file I try to import is referenced from that path... I'd like to start the shell in my app directory.

Psy Shell v0.10.4 (PHP 7.3.23 — cli) by Justin Hileman

>>> require __DIR__ . '/vendor/autoload.php';
PHP Fatal error:  Failed opening required '/var/www/html/vendor/autoload.php' in Psy Shell code on line 1
>>>
Michael
  • 8,357
  • 20
  • 58
  • 86

1 Answers1

2

The solution was to change the directory in the config file of psysh:

chdir('/YOUR_FOLDER/'); in psysh.config.php

Michael
  • 8,357
  • 20
  • 58
  • 86
  • 1
    If someone wants to know where they should put the config, go through this: https://github.com/bobthecow/psysh/wiki/Configuration#-configuration – ssi-anik May 23 '22 at 02:18