Skip to content

Stream timed out with php ^8.3 #134

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

Open
tamerkh404 opened this issue May 10, 2025 · 0 comments
Open

Stream timed out with php ^8.3 #134

tamerkh404 opened this issue May 10, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tamerkh404
Copy link

Version of RouterOS
1.5.5

To Reproduce
$users_q = (new Query('/user-manager/user/print'));
$users = collect($RouterOS->query($users_q)->read());

Expected behavior
Stream timed out

at vendor\evilfreelancer\routeros-api-php\src\Streams\ResourceStream.php:55
51▕ $result = fread($this->stream, $length);
52▕
53▕ // Stream in blocking mode timed out
54▕ if (socket_get_status($this->stream)['timed_out']) {
➜ 55▕ throw new StreamException('Stream timed out');
56▕ }
57▕
58▕ if (false === $result) {
59▕ throw new StreamException("Error reading $length bytes");

1 vendor\evilfreelancer\routeros-api-php\src\APIConnector.php:54
RouterOS\Streams\ResourceStream::read()

2 vendor\evilfreelancer\routeros-api-php\src\Client.php:262
RouterOS\APIConnector::readWord()

I was using Laravel 10 with PHP 8.2 but when I update to Laravel 12 with PHP 8.3 or 8.4 when I request a lot of users the error appears it was working perfectly with 8.2

@tamerkh404 tamerkh404 added the bug Something isn't working label May 10, 2025
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