Do you think it's a problem of my host provider because my wiki is on shared hosting?
Anthony On 10 sep, 16:21, Tonyo <[email protected]> wrote: > I've just added your code block, but i haven't any informations for > debug. > So i've tried with this code block and checked if toFile is null : > > if ($toFile == null) { > echo 'curl_error:'; > var_dump(curl_error($c)); > echo 'CURLINFO_HTTP_CODE: '; > var_dump(curl_getinfo($c, > CURLINFO_HTTP_CODE)); > $headerSize = curl_getinfo($c, > CURLINFO_HEADER_SIZE); > echo 'CURLINFO_HEADER_SIZE: '; > var_dump($headerSize); > echo '$headerStream'; > fseek($headerStream, 0); > var_dump(fread($headerStream, $headerSize)); > $text = false; > $headers = false; > curl_close($c); > return $text; > } > > and i get this message : > > curl_error:string(0) "" CURLINFO_HTTP_CODE: int(200) > CURLINFO_HEADER_SIZE: int(154) $headerStreambool(false) > > POST request failed > > So I think toFile is null. (toFile is assign to null in the parameters > of the function) > > So i must be run this expression : > curl_setopt( $c, CURLOPT_RETURNTRANSFER, true ); > before the line $result = curl_exec( $c ); > > I hope these informations can give you an idea. > > Anthony > > On 10 sep, 14:32, Johannes Beigel <[email protected]> > wrote: > > > On 10.09.2009, at 13:34, Tonyo wrote: > > > > I've just updated the Collection extension and i get the same error on > > > my wiki. > > > Hm, ok, then it's going to be difficult to debug this: > > > mw-serve (on our render server) responds with the correct headers, but > > the cURL call issued from the Collection extension PHP code somehow > > doesn't return any of these – but it doesn't return an error condition > > either. I also noticed that the time it takes from clicking on the > > download link until to the error page is displayed is suspiciously long. > > > Are you able to edit the PHP by hand and temporarily insert some debug > > output into your pages? If yes, you could add this code block > > > if ($toFile) { > > echo 'curl_error:'; > > var_dump(curl_error($c)); > > echo 'CURLINFO_HTTP_CODE: '; > > var_dump(curl_getinfo($c, CURLINFO_HTTP_CODE)); > > $headerSize = curl_getinfo($c, > > CURLINFO_HEADER_SIZE); > > echo 'CURLINFO_HEADER_SIZE: '; > > var_dump($headerSize); > > echo '$headerStream'; > > fseek($headerStream, 0); > > var_dump(fread($headerStream, $headerSize)); > > $text = false; > > $headers = false; > > curl_close($c); > > return $text; > > } > > > just before the line 'if ( curl_errno( $c ) != CURLE_OK ) {' in > > Collection.body.php and trigger the download by clicking on the link? > > > > The result of the command is : [...] > > > OK, so at least the Content-length is there :) > > > -- Johannes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mwlib?hl=en -~----------~----~----~----~------~----~------~--~---
