baibaratsky / php-wmsigner

WebMoney Signer
Other
16 stars 5 forks source link

Maximum function nesting level of '100' reached, aborting! #3

Closed andr2k closed 9 years ago

andr2k commented 9 years ago

Если нет GMP, возникает ошибка:

PHP Fatal error:  Maximum function nesting level of '100' reached, aborting! in /home/a/projects/webmon/php-wmsigner/Signer.php on line 193
PHP Stack trace:
PHP   1. {main}() /home/a/projects/webmon/sign.php:0
PHP   2. baibaratsky\WebMoney\Signer->__construct() /home/a/projects/webmon/sign.php:4
PHP   3. baibaratsky\WebMoney\Signer->initSignVariables() /home/a/projects/webmon/php-wmsigner/Signer.php:41
PHP   4. baibaratsky\WebMoney\Signer::reverseToDecimal() /home/a/projects/webmon/php-wmsigner/Signer.php:93
PHP   5. baibaratsky\WebMoney\Signer::hex2dec() /home/a/projects/webmon/php-wmsigner/Signer.php:166
PHP   6. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:182
PHP   7. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
PHP   8. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
PHP   9. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
.....
PHP  97. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
PHP  98. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
PHP  99. baibaratsky\WebMoney\Signer::hex2decBC() /home/a/projects/webmon/php-wmsigner/Signer.php:202
andr2k commented 9 years ago
<?php
    require 'php-wmsigner/Signer.php';
    use baibaratsky\WebMoney\Signer;
    $signer = new Signer('123', '/home/a/projects/webmon/123.kwm', '123');
    $data = '559242867800156877883895';.
    $signature = $signer->sign($data);
    print $signature;
?>
$ php -v
PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
baibaratsky commented 9 years ago

С GMP удалось запустить?

andr2k commented 9 years ago

Да, с GMP работает.

baibaratsky commented 9 years ago

Хорошо. Для BCMath поменяю алгоритм.