deved-it / grav-plugin-google-maps

Google Maps plugin for Grav
MIT License
12 stars 13 forks source link

installing this broke my grav installation #6

Closed AskAlice closed 7 years ago

AskAlice commented 8 years ago

When I installed this plugin via gpm cli, this happened.

root@zoid:/srv/zoid/grav# bin/gpm install google-maps

GPM Releases Configuration: Stable

The following dependencies need to be installed...
  |- Package shortcode-core

Install this package? [Y|n] Y
Preparing to install Shortcode Core [v2.3.1]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok
  '- Success!

Dependencies are OK

Preparing to install Google Maps [v1.0.6]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok
  '- Success!

Clearing cache

Cleared:  /srv/zoid/grav/cache/twig/*
Cleared:  /srv/zoid/grav/cache/compiled/*
Cleared:  /srv/zoid/grav/images/*

Touched: /srv/zoid/grav/user/config/system.yaml

root@zoid:/srv/zoid/grav# bin/gpm install recaptchacontact
PHP Fatal error:  Cannot redeclare class Grav\Plugin\GoogleMapsPlugin in /srv/zoid/grav/user/plugins/google-maps/google-maps.php on line 55
root@zoid:/srv/zoid/grav# bin/gpm install recaptchacontact
PHP Fatal error:  Cannot redeclare class Grav\Plugin\GoogleMapsPlugin in /srv/zoid/grav/user/plugins/google-maps/google-maps.php on line 55
root@zoid:/srv/zoid/grav# bin/gpm uninstall googlmapsplugin
PHP Fatal error:  Cannot redeclare class Grav\Plugin\GoogleMapsPlugin in /srv/zoid/grav/user/plugins/google-maps/google-maps.php on line 55
root@zoid:/srv/zoid/grav# bin/gpm uninstall googlmapsplugin
PHP Fatal error:  Cannot redeclare class Grav\Plugin\GoogleMapsPlugin in /srv/zoid/grav/user/plugins/google-maps/google-maps.php on line 55
root@zoid:/srv/zoid/grav# cd user/plugins
root@zoid:/srv/zoid/grav/user/plugins# rm -rf google*
root@zoid:/srv/zoid/grav/user/plugins# bin/gpm uninstall googlmapsplugin
-bash: bin/gpm: No such file or directory
root@zoid:/srv/zoid/grav/user/plugins# cd ..
root@zoid:/srv/zoid/grav/user# cd ..
root@zoid:/srv/zoid/grav# bin/gpm uninstall googlmapsplugin
Nothing to uninstall.
root@zoid:/srv/zoid/grav#

but even with the package removed the problem went on. I was getting 500 errors, so in my php error.log it says

2016/10/26 22:35:07 [error] 12538#0: *5 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Opening file for writing failed on error fopen(/srv/zoid/grav/cache/compiled/blueprints/master-zoid.php): failed to open stream: Permission denied' in /srv/zoid/grav/vendor/rockettheme/toolbox/File/src/File.php:202
Stack trace:
#0 /srv/zoid/grav/vendor/rockettheme/toolbox/File/src/File.php(316): RocketTheme\Toolbox\File\File->lock()
#1 /srv/zoid/grav/vendor/rockettheme/toolbox/File/src/PhpFile.php(31): RocketTheme\Toolbox\File\File->save(Array)
#2 /srv/zoid/grav/system/src/Grav/Common/Config/CompiledBase.php(236): RocketTheme\Toolbox\File\PhpFile->save(Array)
#3 /srv/zoid/grav/system/src/Grav/Common/Config/CompiledBase.php(100): Grav\Common\Config\CompiledBase->saveCompiledFile('/srv/hudsonpian...')
#4 /srv/zoid/grav/system/src/Grav/Common/Service/ConfigServiceProvider.php(65): Grav\Common\Config\CompiledBase->load()
#5 /srv/zoid/grav/system/src/Grav/Common/Serv" while reading response header from upstream, client: 24.105.233.41, server: , request: "GET /grav/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/ajenti-v-php-fcgi-zoidcom-php-fcgi-0.sock:", host: "zoid"

This is what happened the first time. I removed the plugin folders, then had to chmod -R a+w grav for it to stop erring. The second time I tried to see if it was consistent. I was able to uninstall it through gpm perfectly fine, and the error stopped happening once I did that. This could be because I had changed file permissions of the google* folders to 777 while in FTP because it wasn't letting me remove them, thus the rm -rf.

When I install via admin panel it works fine. Please see if you can reproduce. Grav v1.1.8 I'm running ajenti-v with this configuration http://support.ajenti.org/topics/1267-tutorial-installing-grav-on-ajenti-v/