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

PHP 8.4 failure #130

Closed
4wifi opened this issue Jan 12, 2025 · 2 comments
Closed

PHP 8.4 failure #130

4wifi opened this issue Jan 12, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@4wifi
Copy link

4wifi commented Jan 12, 2025

Trying to make a connection to the router with PHP 8.4 (FPM) fails with this error. No other changes made other than swapping from php82-php-fpm to php84-php-fpm

PHP Fatal error: Uncaught RouterOS\Exceptions\StreamException: Stream timed out in XXXX/evilfreelancer/routeros-api-php/src/Streams/ResourceStream.php:55
Stack trace:
#0 XXXX/evilfreelancer/routeros-api-php/src/APILengthCoDec.php(115): RouterOS\Streams\ResourceStream->read()
#1 XXXX/evilfreelancer/routeros-api-php/src/APIConnector.php(53): RouterOS\APILengthCoDec::decodeLength()
#2 XXXX/vendor/evilfreelancer/routeros-api-php/src/Client.php(255): RouterOS\APIConnector->readWord()
#3 XXXX/vendor/evilfreelancer/routeros-api-php/src/Client.php(310): RouterOS\Client->readRAW()
#4 XXXX/RouterOS.php(906): RouterOS\Client->read()

Have rolled back for now, will look at writing REST equiv of my class but like your old-API just fine and wondered if there was an easy fix.

@4wifi 4wifi added the bug Something isn't working label Jan 12, 2025
@4wifi
Copy link
Author

4wifi commented Jan 12, 2025

Thanks, but it seems you did not read my error report. What you linked has nothing to do with the problem at all.

Same code, same router, different version of PHP causes the error. PHP 8.2 works fine, PHP 8.4 fails. Have updated to the latest release via composer and still the same.

Happy to help diagnose more, but at this point I am hoping you may have an idea why it might be happening as you are more familiar with the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants