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

bigrattle's avatar

php artisan tinker is not working

I have created a Laravel 9 project and tried to run php artisan tinker command on local, it is working fine, but same project deployed on cPanel, the same command doesn't return anything. It got exited without any error.

Here is the composer.json looks like:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "doctrine/dbal": "^3.4.1",
        "fruitcake/laravel-cors": "^3.0",
        "guzzlehttp/guzzle": "^7.4.5",
        "laravel/framework": "^9.0",
        "laravel/tinker": "^2.8",
        "laravel/ui": "^4.0",
    },
    "require-dev": {
        "spatie/laravel-ignition": "^1.0",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    }
	...
}
0 likes
9 replies
Snapey's avatar

your ssh command line in cpanel could be running a different php version

check that first with php - V

Snapey's avatar

permissions issue ? Is the site working and just an issue with tinker?

bigrattle's avatar

@Snapey yes, the site is working properly, just getting issue with tinker, I have also tried composer require laravel/tinker and composer update command to make sure any update required. But still same issue.

Snapey's avatar

@bigrattle is your ssh user the same as the web server user? Look at files created by the web server (eg log files) is it the same user account?

bigrattle's avatar
bigrattle
OP
Best Answer
Level 9

Found issue with my memory limit, error got logs in application root folder with file name error_log. After increasing it is working fine. Thanks.

1 like

Please or to participate in this conversation.