maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

Error message: The application may only be invoked from a command line, got "fpm-fcgi" #174

Closed dark-rider closed 2 years ago

dark-rider commented 2 years ago

When I replace geoip2.phar version 2.11.0 by 2.12.0, the following error message appears instead of the desired PHP website: The application may only be invoked from a command line, got "fpm-fcgi"

How to fix this?

oschwald commented 2 years ago

Thanks. We upgraded our version of Box that generates the Phar file in the 2.12.0 release. This was an unintended side effect. 2.12.1 should be out shortly with a fix.

oschwald commented 2 years ago

2.12.1 has been released with the fix. Thanks!

mrcblt commented 2 years ago

I tried to use the 2.12.1 release together with the Geoblocker plugin within my own Nextcloud instance, and it still does not work. The Nextcloud protocol shows the following message:

require_once(): Failed opening required 'phar://geoip2.phar/vendor/autoload.php'

oschwald commented 2 years ago

@mrcblt, this sounds like a separate issue. I was able to reproduce the initial issues and I no longer experience it. It would make sense to open a separate issue along with steps on how we can reproduce it. Also, please confirm if 2.11.0 worked in this manner.

mrcblt commented 2 years ago

2.11.0 works fine. I will open a separate issue with a bit more details.

mrcblt commented 2 years ago

I just copied it back and forth and now it works. Sorry for the inconvenience.

oschwald commented 2 years ago

Great!