phpseclib exceeded max execution time

后端 未结 1 1025
孤独总比滥情好
孤独总比滥情好 2021-01-24 23:14

I am currently using laravel(which uses phpseclib) for my project and was having issues with the ssh connection, getting the error Maximum execution time of 60 seconds exc

相关标签:
1条回答
  • 2021-01-24 23:30

    I have solved this, it turns out my openssl library version and header version did not match, this causes phpseclib to use a slower library, which then causes the timeout. as a temporary fix I have modified the following.

    here:

    starting at line 256

    from this :

           switch (true) {
                case !isset($versions['Header']):
                case !isset($versions['Library']):
                case $versions['Header'] == $versions['Library']:
                    define('MATH_BIGINTEGER_OPENSSL_ENABLED', true);
                    break;
                default:
                    define('MATH_BIGINTEGER_OPENSSL_DISABLE', true);
            }
    

    to this:

          switch (true) {
                case !isset($versions['Header']):
                case !isset($versions['Library']):
                case $versions['Header'] == $versions['Library']:
                    define('MATH_BIGINTEGER_OPENSSL_ENABLED', true);
                    break;
                default:
                    define('MATH_BIGINTEGER_OPENSSL_ENABLE', true);
            }
    
    0 讨论(0)
提交回复
热议问题