Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to get version 1.9.2 running #8

Closed
d-Rickyy-b opened this issue May 10, 2018 · 2 comments
Closed

Not able to get version 1.9.2 running #8

d-Rickyy-b opened this issue May 10, 2018 · 2 comments
Labels

Comments

@d-Rickyy-b
Copy link
Contributor

Hey there,

when I try to run the version 1.9.2 of grocy, it returns a 500 - Internal Server Error, because of an error in one of the dependencies (cors-middleware).

This is the error I get:

Fatal error: 
Uncaught TypeError: Return value of Tuupola\Middleware\CorsMiddleware::origin() must be an instance of Tuupola\Middleware\void, none returned in /var/www/html/vendor/tuupola/cors-middleware/src/CorsMiddleware.php:165 

Stack trace: 
#0 [internal function]: Tuupola\Middleware\CorsMiddleware->origin(Array) 
#1 /var/www/html/vendor/tuupola/cors-middleware/src/CorsMiddleware.php(119): call_user_func(Array, Array) 
#2 /var/www/html/vendor/tuupola/cors-middleware/src/CorsMiddleware.php(51): Tuupola\Middleware\CorsMiddleware->hydrate(Array) 
#3 /var/www/html/routes.php(88): Tuupola\Middleware\CorsMiddleware->__construct(Array) 
#4 /var/www/html/app.php(42): require_once('/var/www/html/r...') 
#5 /var/www/html/public/index.php(3): require_once('/var/www/html/a...') 
#6 {main} thrown in /var/www/html/vendor/tuupola/cors-middleware/src/CorsMiddleware.php on line 165

My php version is:

root@debian-vm:~# php -v
PHP 7.0.28-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.28-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies

I also tried with php 7.1.17 without success.

If you want to try on your own - I created a little installation script to automate the process. Thanks in advance for the help.

@berrnd
Copy link
Member

berrnd commented May 11, 2018

I can reproduce that with PHP 7.1, it works with PHP 7.2 - so must be a problem with tuupola/cors-middleware, although they say the requirement is only PHP 7.1...

Anyway, because I always use the latest version of PHP only, I will correct the dependency information.

@berrnd berrnd closed this as completed in b607f18 May 11, 2018
@d-Rickyy-b
Copy link
Contributor Author

Hmm, seems like you are right. After installing php 7.2 it works great again.

For others - this is what you need to do, if you come across the same issue:

~# apt-get install libapache2-mod-php7.2
~# a2dismod php7.1
~# a2enmod php7.2
~# systemctl restart apache2

Thanks for taking care about it :)

@ghost ghost mentioned this issue Nov 30, 2018
@berrnd berrnd mentioned this issue Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants