-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
The plugin repository could not be contacted on Windows - select_stream problem #3474
Comments
Just discovered that there is a isWindows function that may help |
We're not using stream_select on a proc_open stream but on a network stream. I manage many Windows setups during my day job and the HTTP client works fine - so it's not a general Windows problem. Simply removing this code is not a proper solution and likely will cause broken downloads occasionally. The first step would be to provide additional data to find out what goes wrong on your system. |
You lost me with I got the following warning from the stream_select(): unable to select [2]: No such file or directory (max_fd=508) It seems that I have tried with Php:
And the Thanks |
Windows version 10 (20H2 - OS Build 19042.867), it's a dev laptop. This code works without any problem. $filename = "http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php?q=dw2pdf&fmt=yaml";
$handle = fopen($filename, "rb");
$http = stream_get_contents($handle);
fclose($handle);
var_dump($http); |
This code does not work if I let the $http = new \dokuwiki\HTTP\DokuHTTPClient();
$http->debug = 1;
$http->get('http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php?q=sqlite&fmt=yaml');
var_dump($http); |
Can you reproduce the problem on a more modern PHP (eg. 7.4)? |
Yeah. It works in 7.4.6. |
7.2.28 works also. |
I don't have any other locally php version to test. |
We have already removed all unit tests for PHP 5.6: https://github.com/splitbrain/dokuwiki/blob/4ee6ddae660f9ec72c1f6e2ddb72d6b29d6d8900/.github/workflows/testLinux.yml#L13 Should we make it official that PHP 5.6 is no longer supported? |
@phy25 it's already official: 3f874cb only the current stable still supports 5.6 @gerardnico I will close this as won't fix for above reason |
@splitbrain I'm on the stable. This code is also on the stable. I have got to the official documentation before installing: I would understand that you would not fix this but it should be stated at minimum somewhere |
@gerardnico current stable runs fine on 5.6 (though I would not recommend it) and as far as I know you're the only one having this problem. Even if we would develop a fix or workaround for the problem, it would only be released with the next DokuWiki version. But since this new version will not support 5.6 anymore it would be futile to implement a fix for something that can not be reproduced on newer php versions. |
@splitbrain Yeah I got that. I should have been more specific over what I wanted. I have updated already the requirement documentation
This is just that we lost already too much time on it and I don't want anybody to get into the same problem (prevention). If you are ok with this change, I will let it otherwise I can change it. |
this is windosh*t only problem.. most production servers are unix type anyway so i dont think limit php to 7 is solution.. development tools also stills supports 5.6 so there's no sense in limiting |
@mckaygerhard This is not limiting, this is just seen as |
maybe the only reference in wiki are made by you about supporting 5.6.. and is a windo only related problem, why si not you that the changed the code event ask to support windo |
@mckaygerhard Sorry but I didn't get what you want. Did you get this problem ? Can i help you ? Note: The php version 5.6 is also end of life since 31 Dec 2018 which means that most of the installations should have been upgraded. |
If you have installed Dokuwiki on Windows.
You will get the following message:
Why ?
Because the HTTP Client makes use of the function select_stream to check a timeout as we can seen here
The problem is that the function select_stream returns always
false
as stated in the documentation:The timeout kick-in and we get the faulty error message.
Solution:
stream_select
timeout block and it works like a charmThe text was updated successfully, but these errors were encountered: