-
Notifications
You must be signed in to change notification settings - Fork 8
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
LogicException on geonames:import #3
Comments
Thanks for the report. I've fixed it. |
It seems that problem still not fixed. Now downloadsSize is always equal to zero if curl_getinfo returns -1. So nothing will be downloaded at all. |
@mekras I'm not able to reproduce the issue, both with my unit testing and with "dump files" download. The call to CurlDownload::requestContentLength is just for displaying progress, so it should not prevent download. The curl_info which trigger the error is bound to an HEAD request to the Geonames dump files folder. Just to exclude some connection/configuration error, try this in a shell on your side: curl -I http://download.geonames.org/export/dump/allCountries.zip |
But if I insert code print_r(curl_info($ch)); die; into
Backtrace:
From console:
Some more info:
|
I have a less recent version of both PHP and cURL, so I don't think (hope :) it is a regression. There are to weird things:
So maybe it's just a PHP module problem. Just to be sure check that the configuration contain something like (reduced):
Also, you can try to add a simple "return 1" instead of the body of requestContentLength. You'll get a weird progress bar, but the download should happens anyway. If that's the case maybe there is some problem with ''curl_copy_handle'' |
The same problem on FreeBSD with PHP 5.3.28 and cURL 7.35.0 |
I reopen the issue since it is not fixed. Still I'm clueless on where to start.
In the meanwhile, I'm working on some code changes to use Guzzle as a download adapter. CurlDownload will still be there anyway, so I hope we get this fixed. |
Not yet. I'm trying to determine the cause of the error.
I'll check it on the next week. |
Download tests failed:
|
I've just pushed some updates and refactoring. giosh94mhz_geonames:
download:
adapter: guzzle For now the instance of |
Using Guzzle solves the problem. But it requires to set memory_limit at least 1G. |
Mmm... if Guzzle solves it than there is definitely something wrong in For the memory_limit the problem is the cache which call |
Got error " [LogicException] You can't regress the progress bar" when running geonames:import.
The cause is that
curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD)
returns -1 when download size not known at line 105 in CurlDownload.The text was updated successfully, but these errors were encountered: