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

barantr90's avatar

laravel 5.2 composer update also php artisan problem

Is somebody get composer update error today?

here is my error;

when I running composer update I got this

php artisan clear-compiled [PDOException]

SQLSTATE[HY000] [2002] No such file or directory

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error

[RuntimeException]

Error Output:

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--] []...

Also php artisan command doesnt work, too.

0 likes
11 replies
sj's avatar

Have you tried delete the /vendor/ folder and try composer install

sj's avatar

I have tried before where composer fails and php artisan fails, then i just delete the vendor folder and install it all again @barantr90

ohffs's avatar

Are you using mysql? If so is it running ok? Maybe check your db connection isn't using 'localhost' instead of 127.0.0.1 too.

barantr90's avatar

when I am try localhost I am getting this error "SQLSTATE[HY000] [2002] No such file or directory", if I am try 127.0.0.1 I am getting this error "SQLSTATE[HY000] [2002] Connection refused" :( @ohffs

ohffs's avatar

Can you connect directly to your sql server - either with the commandline or something like Sequel Pro? Are you running something like MAMP?

ohffs's avatar

And can you connect ok with sequel pro?

ohffs's avatar

If you ssh into your homestead box and try running the mysql commandline tool does it work ok? Eg,

mysql -uhomestead -psecret your-db-name

Please or to participate in this conversation.