Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Elzakzouk's avatar

Tinker dose't work in shared hosting

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..

0 likes
5 replies
zort's avatar

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'
];
33 likes
bernhardh's avatar

@zort Not working for me. It still says

Unable to create PsySH runtime directory. Make sure PHP is able to write to /run/user/0 in order to continue.

Wimmie's avatar

@bernhardh It worked for me as well, just make sure it is placed in the home dir of the user.

Taz416's avatar

Just worked for me fine on GoDaddy shared hosting. Thanks!

Please or to participate in this conversation.