• Resolved Florin Oprea

    (@florinopreaeu)


    Hi, Iulia,

    If there is P3 (Plugin Performance Profiler) activated, then the entire blog is going down, or the Login IP & Country Restriction cannot be activated.

    The error on activation or when the site is going down is:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: strict_types declaration must be the very first statement in the script in 
    /home/..../public_html/wp-content/plugins/login-ip-country-restriction/login-restrict-country.php on line 33

    Florin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi Florin,

    What happens if you activate the Login IP & Country Restriction plugin and the other one is deactivated?

    Regards,
    Iulia

    Thread Starter Florin Oprea

    (@florinopreaeu)

    Hi, Iulia,

    If P3 (Plugin Performance Profiler) is already activated, then I cannot activate Login IP & Country Restriction. The message is:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: strict_types declaration must be the very first statement in the script in 
    /home/..../public_html/wp-content/plugins/login-ip-country-restriction/login-restrict-country.php on line 33

    If there is Login IP & Country Restriction activated and I activate P3 (Plugin Performance Profiler) then the entire blog is down (blank). The same error is found in this case in the site logs.

    My solution was to comment this line:
    //declare( strict_types = 1 );

    Regards,
    Florin

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    There seems to be an issue with P3 (Plugin Performance Profiler), either it is not compatible with the latest PHP version or the latest core version.
    https://www.ads-software.com/support/topic/error-500-fully-crashed-website/

    I installed the plugin to the latest core version and checked and indeed, the plugin is breaking the whole scripts that are updated for PHP8 compatibility.

    It’s worth asking for support on that plugin forum as well, maybe they are working on updating the code to work for the latest versions or prepare for PHP8.

    Try to deactivate that plugin, then activate the Login IP & Country Restriction and see if you get any errors after that.

    Let me know if this helps.

    Have a nice evening,
    Iulia

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    This is what I could find when debugging P3, if this helps in any case.

    This is the error when debugging P3


    So, the plugin P3 is looking for some mu-plugins files regardless of being installed as a regular plugin. That triggers header errors, hence the “strict_type” declaration will not be seen as the first thing.

    • This reply was modified 4 years, 3 months ago by Iulia Cazan.
    Thread Starter Florin Oprea

    (@florinopreaeu)

    Hi,
    It’s up to you if you find that using strict_types is suitable or not in this moment. There could be more plugins incompatible with this.
    It seems that there is no performance advantages (yet) for using strict_types in PHP.
    Florin.

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi Florin,

    I added some compatibility changes to the latest plugin. Please upgrade and let me know if this is still an issue for you.

    Regards,
    Iulia

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Conflict: P3 (Plugin Performance Profiler)’ is closed to new replies.