Title: Plugin does not work PHP Fatal error
Last modified: June 8, 2018

---

# Plugin does not work PHP Fatal error

 *  Resolved [Ivan](https://wordpress.org/support/users/ice1000000/)
 * (@ice1000000)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/plugin-does-not-work-php-fatal-error/)
 * I can not activate it, I get this error: PHP message: PHP Fatal error: Cannot
   use “self” when no class scope is active in /www/site_442/public/wp-content/plugins/
   geolocation-detector-for-gravity-forms/geolocation-detector-for-gravity-forms.
   php on line 45
 * Here’s what in line 45:
    $max_chars = self::get_counter_script($form_id, $field_id,
   $field[“maxLength”]);
 * David, how can this be remedied?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [David Davis](https://wordpress.org/support/users/dcgws/)
 * (@dcgws)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/plugin-does-not-work-php-fatal-error/#post-10602724)
 * Hi [@ice1000000](https://wordpress.org/support/users/ice1000000/)
 * Are you using PHP 7? I’ve made an adjustment to the code. Please let me know 
   if this addresses the issue.
 * Best
    David
 *  [ramoo](https://wordpress.org/support/users/ramoo/)
 * (@ramoo)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/plugin-does-not-work-php-fatal-error/#post-11069555)
 * hai david i am facing the same problem again.
    Fatal error: Cannot use “self”
   when no class scope is active in /var/www/html/wp-content/plugins/geolocation-
   detector-for-gravity-forms-master/geolocation-detector-for-gravity-forms.php 
   on line 45
 * can u pls help

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin does not work PHP Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/geolocation-detector-for-gravity-forms/assets/icon-256x256.
   png?rev=1425252)
 * [Geolocation Detector for Gravity Forms](https://wordpress.org/plugins/geolocation-detector-for-gravity-forms/)
 * [Support Threads](https://wordpress.org/support/plugin/geolocation-detector-for-gravity-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/geolocation-detector-for-gravity-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geolocation-detector-for-gravity-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geolocation-detector-for-gravity-forms/reviews/)

## Tags

 * [PHP Fatal error](https://wordpress.org/support/topic-tag/php-fatal-error/)

 * 2 replies
 * 3 participants
 * Last reply from: [ramoo](https://wordpress.org/support/users/ramoo/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/plugin-does-not-work-php-fatal-error/#post-11069555)
 * Status: resolved