Rakib Hasan Sabbir
Rakib Hasan Sabbir

Reputation: 96

Pusher\Exception\HttpException Bad request

laravel- 5.6 Php - 7.2 pusher - 3.0

when try to connect with pusher: when try to connect with pusher

Upvotes: 0

Views: 1181

Answers (2)

  1. run command below ON UBUNTU SERVER 18.4

    sudo add-apt-repository ppa:ondrej/php

  2. install curl for php (php7.2 is php version)

    sudo apt install php7.2-curl (php7.2 is php version)

  3. update pusher server run it in laravel project

    composer require pusher/pusher-php-server

  4. Restart NGINX service

    service nginx restart

It works for me.

Upvotes: 0

Eka Prawira
Eka Prawira

Reputation: 21

You should provide more details to your question so others have a better picture of what might cause the problem.

But I ran into the exact same problem recently and might be able to help. In my instance, this problem is caused by composer pulling in pusher dev-lib instead of published version when I run composer require pusher/pusher-php-server "~3.0". It happens because I don't have php-curl installed in my setup. After installing it, I remove the current dev-lib, rerun composer require pusher/pusher-php-server "~3.0" and it works like a charm.

Upvotes: 2

Related Questions