Support » Plugin: String locator » Loved it until upgrading to HHVM

  • I keep getting this error:
    The maximum time your server allows a script to run is too low for the plugin to run as intended, at startup 2 seconds have passed

    I’ve found that this code is causing the problem:

    function nearing_execution_limit() {
    $built_in_delay = apply_filters( 'string-locator-extra-search-delay', 2 );
    $execution_time = ( microtime( true ) - $this->start_execution_timer + $built_in_delay );
    if ( $execution_time >= $this->max_execution_time ) {
    return $execution_time;
    return false;

    It gets max_execution_time for this comparison from the following command:
    $this->max_execution_time = ini_get( ‘max_execution_time’ );

    However when you use an ini_get command while running HHVM that result is always 0.

    Due to this the check is failing, since essentially its own expected runtime is always bigger than 0.

    The plugin works fine when I use PHP 7 instead, the error is no longer there and the search works as expected.

    Will a static value for max_execution_time cause problems in other parts of the plugin? It cannot get the value dynamically via ini_get while HHVM is active.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Marius L. J.



    I’ve not got a HHVM setup my self, so I’ve not been able to test this, but some quick research shows that you’ll have problems with more areas of the plugin that just this one as HHVM requires you to run completely different values through the ini_get method for a few sections of the plugin.

    I’ve added a note to look into this more, but I’m unfortunately swamped this coming week and won’t have time to look into it till the week after at the earliest.

    Thank you for the info, it’s very much appreciated!

    Plugin Author Marius L. J.


    I hate leaving people hanging so I did a little bit of digging after writing that reply (hey 16 minutes is a lifetime on the internet!) and I foudn this little article which might help?

    Hi Marius, thanks so much for your reply. SiteGround did perform the change suggested in the link you provided. Unfortunately, the error still occurs. I’ve upgraded my review of your plugin, as I’m thankful to know you’re aware of this issue, and I’m sure you’ll find a resolution to this problem at some point in the future.

    Plugin Author Marius L. J.


    Following up here, I’ve got what might be a fix to the problem in a 2.0.3 release, would you be willing to have a test of it and see how it works for you? (I’m a bit uncertain if the execution time will create a similar issue, for now I’m only addressing the memory limit).

    If you do have a chance to try out I’d appreciate any input on your experience with it.

    It’s working perfectly. Thank you so much!

    Plugin Author Marius L. J.


    Fantastic, I’ll push that update out publicly today then, thank you very much for taking the time to test it!



    Hey, I have v2.0.3 running on wordpress v4.7, and I still get this issue: “The maximum time your server allows a script to run is too low for the plugin to run as intended, at startup 2 seconds have passed”.

    What can I do to solve this problem?

    Plugin Author Marius L. J.



    This is an unrelated issue, would you mind creating a topic in the support forums about it so we don’t send a lot of notifications to the creator of this review?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Loved it until upgrading to HHVM’ is closed to new replies.