cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
13.93k stars 1.55k forks source link

Uncaught ErrorException: count(): Parameter must be an array or an object that implements Countable in /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php:51 #4183

Closed adrian-abit closed 1 year ago

adrian-abit commented 3 years ago

When i try to install cachet via php artisan app:install i get this error:

PHP Fatal error:  Uncaught ErrorException: count(): Parameter must be an array or an object that implements Countable in /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php:51
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'count(): Parame...', '/var/www/Cachet...', 51, Array)
#1 /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php(51): count(NULL)
#2 /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionHandlerTrait.php(47): GrahamCampbell\Exceptions\ExceptionIdentifier->identify(Object(ErrorException))
#3 /var/www/Cachet/bootstrap/cache/compiled.php(2163): GrahamCampbell\Exceptions\ExceptionHandler->report(Object(ErrorException))
#4 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(ErrorException))
#5 {main}
  thrown in /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php on line 51
PHP Fatal error:  Uncaught ErrorException: count(): Parameter must be an array or an object that implements Countable in /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php:51
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'count(): Parame...', '/var/www/Cachet...', 51, Array)
#1 /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php(51): count(NULL)
#2 /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionHandlerTrait.php(47): GrahamCampbell\Exceptions\ExceptionIdentifier->identify(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#3 /var/www/Cachet/bootstrap/cache/compiled.php(2163): GrahamCampbell\Exceptions\ExceptionHandler->report(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#4 /var/www/Cachet/bootstrap/cache/compiled.php(2181): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#5 [internal function]: I in /var/www/Cachet/vendor/graham-campbell/exceptions/src/ExceptionIdentifier.php on line 51
MarkL4YG commented 3 years ago

IIRC, this is what happens when you run Cachet on php7.4 or newer.
Just use 7.3 and it should resolve the countable-issue.

adrian-abit commented 3 years ago

IIRC, this is what happens when you run Cachet on php7.4 or newer. Just use 7.3 and it should resolve the countable-issue.

I am using php 7.3 PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

rajeevkk32 commented 3 years ago

I resolved the issue using

https://github.com/CachetHQ/Cachet/issues/4132#issuecomment-712489727

adrian-abit commented 3 years ago

I resolved the issue using

#4132 (comment)

Didn't work for me, just replaces it again.

jbrooksuk commented 1 year ago

Thank you for your input on Cachet 2.x. We are shifting our attention and resources to Cachet 3.x and will no longer be supporting the 2.x version. If your feedback or issue is relevant to the 3.x series, we encourage you to engage with the new branch.

For more information on the Cachet rebuild and our plans for 3.x, you can read the announcement here.

We appreciate your understanding and look forward to your contributions to the new version.