Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random_int() expects parameter 2 to be int #7

Open
niranjan-reddy opened this issue Sep 29, 2020 · 1 comment
Open

random_int() expects parameter 2 to be int #7

niranjan-reddy opened this issue Sep 29, 2020 · 1 comment

Comments

@niranjan-reddy
Copy link

While running this on my local machine I found this error in the error log file.

[Tue Sep 29 21:20:21.908468 2020] [php7:error] [pid 13717] [client ::1:54442] PHP Fatal error: Uncaught TypeError: random_int() expects parameter 2 to be int, float given in /var/www/html/dyndns-updater/alicloud-php-updaterecord/V20150109/AlicloudUpdateRecord.php:228\nStack trace:\n#0 /var/www/html/dyndns-updater/alicloud-php-updaterecord/V20150109/AlicloudUpdateRecord.php(100): random_int(1000000000, 9999999999)\n#1 /var/www/html/dyndns-updater/index.php(20): Roura\Alicloud\V20150109\AlicloudUpdateRecord->sendRequest()\n#2 {main}\n thrown in /var/www/html/dyndns-updater/alicloud-php-updaterecord/V20150109/AlicloudUpdateRecord.php on line 100

@niranjan-reddy
Copy link
Author

After I converted both the occurrences of the value (9999999999) to int by either (int) or intval(999...) it does not throw any console error but the browser throws the error as follows:

Array ( [RequestId] => FCDC6097-DBF6-4E90-905C-9F648975EAA7 [Message] => Specified signature is not matched with our calculation. server string to sign is:GET&%2F&AccessKeyId%3Dxxxxxxxxxxxxxxxxxxxxxxxxxxxx%26Action%3DUpdateDomainRecord%26Format%3Djson%26RR%3Dwww%26RecordId%3D20483794109989888%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D1077116639%26SignatureVersion%3D1.0%26Timestamp%3D2020-09-29T15%253A54%253A59%26Type%3DA%26Value%3D%253A%253A1%26Version%3D2015-01-09 [Recommend] => https://error-center.aliyun.com/status/search?Keyword=SignatureDoesNotMatch&source=PopGw [HostId] => dns.aliyuncs.com [Code] => SignatureDoesNotMatch )

Repository owner deleted a comment from rohitsonawat Feb 23, 2024
Repository owner deleted a comment from uc-Pri Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant