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
Unable to install Dw2Pdf with Extension manager (size?) #1930
Comments
I have the same question with you |
Investigating on this on Linux based server (Ubuntu with Apache), leads to understanding that due to the plugin size being rather high compared to other plugins, timeouts may occur (depends on local and Github speed of course). The changes listed below solve for me. Unfortunatly a value hardcoded in sources need to be changed also, any plans for having this configurable in a future release? (1) Inside function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){
global $conf;
$http = new DokuHTTPClient();
$http->max_bodysize = $maxSize;
$http->timeout = 25; //max. 25 sec
$http->keep_alive = false; // we do single ops here, no need for keep-alive must be changed to 60 seconds: function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){
global $conf;
$http = new DokuHTTPClient();
$http->max_bodysize = $maxSize;
$http->timeout = 60; //changed to max. 60 sec
$http->keep_alive = false; // we do single ops here, no need for keep-alive (2) inside
should be upgraded to
|
Future plan is to reduce the size of the dw2pdf plugin download. |
See also: splitbrain/dokuwiki-plugin-dw2pdf#194 |
Yes I understand. So no plans for having timeout as a configurable item? Shall I close the issue? |
I just had a similar problem when I tried to install the "DokuWiki Upgrade Plugin" update from 2017-02-03. Got an error that the file could not be downloaded. However, downloading and then installing it manually worked just fine. Also, when I open the "Extension Manager" page on a site where the local intranet has a poor internet connection only I often get an error "The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy setting [Retry]". And usually it works when I click (eventually several times) on [Retry]. So I think it would be a good idea to increase the timeout, or even make the timeout a configurable value, as suggested earlier. |
Hi, In short - in the case here on the machine, openssl caused the error, because the installed php release requires strict Certificate checks, which cant be deactivated using fsockpen. $socket =@fsockopen($server,$port,$errno, $errstr, $this->timeout);
if (!$socket){
dbglog("fsockopen failed, trying without peer verification. $server:$port");
//OSSL Error: func(144):reason(134) - test - fixMe: should ask the user.
$socket_options = array('ssl' => array('verify_peer' => false, 'allow_self_signed' => true, 'verify_peer_name' => false));
$stream_context = stream_context_create($socket_options);
stream_context_set_default($socket_options);
$socket=stream_socket_client( "$server:$port", $errno, $errstr,30, STREAM_CLIENT_CONNECT , $stream_context);
if (!$socket){
dbglog($errno,$errstr);
$this->status = -100;
$this->error = "Could not connect to $server:$port\n$errstr ($errno)";
return false;
}
dbglog("OKI");
} Edit: just read the comments and like to state: please excuse the noise. |
You did try to install dw2pdf with the extension manager, but that fails? Is it in general acceptable (security-wise) to disable |
@arjunae's post seems not to be related to the initial ticket at all. Probably all downloads via HTTPS failed for him. The solution to disable peer verification is indeed a bad idea and I advise strongly against it. Since the initial question seems to be solved (we removed the download limit when installing extensions), I'm closing this. |
Had this error on 5/3/2020. Updated the above mentioned variable
to 60 in /inc/io.php But still that error ( A bit later, seemed to be 60 seconds) Download der Datei: https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/tarball/master nicht möglich. |
@wbswbs Do you have shell access to your server? If yes you can try |
45,30M 303KB/s in 3m 6s Would be nice, if I wouldn't have to download the fonts again, if I have em already. |
Well this is more of an issue on Dw2Pdf to see if it can download them after installation, you may want to create one there. Well since there is no central storage of plugin downloads, it would be very tricky to implement the incremental download. Eventually the plugin authors have to create those patches between versions. Not sure if this is worthwhile. |
The Dw2pdf plugin uses the mPDF library. This library is busy with splitting the fonts and the library. If this is all in place, it can be incorporated in the dw2pdf plugin as well. |
Installing (or upgrading) the mentioned extension leads to an error while using Extensions Manager after seconds:
"Unable to download the file: https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/tarball/master"
The file containing the extension is actually fairly big (47M) maybe some limitation for Extensions Manager? PHP seems to be correctly configured, I can down/upload files up to 100M on Dokuwiki.
The text was updated successfully, but these errors were encountered: