You need to create a config file for PsySH with runtimeDir variable. Just create a file ~/.config/psysh/config.php with:
<?php
return [
'runtimeDir' => '~/tmp'
];
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey guys..
I uploaded my laravel project to shared hosting and I used putty to connect through SSH my problem is Tinker does't work with me it give me this error
Psy\Exception\RuntimeException
Unable to create PsySH runtime directory. Make sure PHP is able to write to /run/user/1615 in order to continue.at vendor/psy/psysh/src/Configuration.php:367 363| } 364| 365| if (!\is_dir($this->runtimeDir)) { 366| if (!@\mkdir($this->runtimeDir, 0700, true)) {
367| throw new RuntimeException(sprintf('Unable to create PsySH runtime directory. Make sure PHP is able to write to %s in order to continue.', dirname($this->runtimeDir))); 368| } 369| } 370| 371| return $this->runtimeDir;+20 vendor frames 21 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
How to solve this issue?
Thank you..
Please or to participate in this conversation.