Protocol http not supported or disabled in libcurl


#1

Runnning piwik 2.1 RC6

I run for the first time the auto-archive script via the command :
/usr/bin/php /var/www/html/piwik/misc/cron/archive.php --url=http://w3stat.unil.ch/pi
wik/ > /home/cmoullet/log/archive.out 2>&1

At the end of the output I have the following error message for the scheduled task :

INFO [2014-02-20 15:49:27] [31b48] SCHEDULED TASKS
INFO [2014-02-20 15:49:27] [31b48] Starting Scheduled tasks…
DEBUG Piwik\CliMulti[2014-02-20 15:49:27] [31b48] /usr/bin/php -q /var/www/html/piwik/console climulti:request --piwik-domain=‘w3stat.unil.ch’ ‘module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=5589d5f10a4f0a62cbbed9c93751d800&trigger=archivephp&pid=058484aef317a4283a932a104be59c6a8eb91c99c76dad09f0ed19ade8fb7985b33f3522eb131cb6a6c9540772f821f1b5ae0’ > /var/www/html/piwik/tmp/climulti/058484aef317a4283a932a104be59c6a8eb91c99c76dad09f0ed19ade8fb7985b33f3522eb131cb6a6c9540772f821f1b5ae0.output 2>&1 &
INFO [2014-02-20 15:49:27] [31b48] Error: GeoIPAutoUpdater: failed to download ’ http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz’ to ‘/var/www/html/piwik/misc/GeoIPCity.dat.dat.gz’: curl_exec: Protocol http not supported or disabled in libcurl
task,output
GeoIPAutoUpdater.update,ERROR: GeoIPAutoUpdater: failed to download ’ http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz’ to ‘/var/www/html/piwik/misc/GeoIPCity.dat.dat.gz’: curl_exec: Protocol http not supported or disabled in libcurl

I do not understand since I checked ( see joined image) that the http protocol is enabled in my php libcurl

Furthermore, why does it try to save the geoIP data as “/var/www/html/piwik/misc/GeoIPCity.dat.dat.gz” with doubled dat ??

Thanks for your reply…


#2

PS: the download works perfectly manually !!


(Matthieu Aubry) #3

The error was :
Error: GeoIPAutoUpdater: failed to download ’ http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz’ to ‘/var/www/html/piwik/misc/GeoIPCity.dat.dat.gz’: curl_exec: Protocol http not supported or disabled in libcurl

see: php - Protocol https not supported or disabled in libcurl - Stack Overflow


#4

I already read this link. and both conditions ( see my attached image) are fullfilled ie http mentioned both in registered PHP streams and protocols supported in curl !!!

So the question remains …

Thanks for another answer !!!


(Matthieu Aubry) #5

Check that it is also enabled in the PHP CLI configuration, as the archive.php cron is using the PHP CLI rather than HTTP


#6

How can I check that ? It seems to me looking a at php.d directory, taht php cli uses the same modules as php cgi … and it includes the curl modules


#7

For information, the command line :
curl http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz > /tmp/geoip.dat.gz

works perfectly … So I think there is no problem with my installation but rather in the archive.php script or subscript responsible for the automatic upload of geoIP (GeoIPAutoUpdater). I could not find the error…

Another strange thing is that it renames the files as GeoIPCity.dat.dat.gz and not GeoIPCity.dat.gz as you can see in the error log below. For sure there is a mistake in the script…

GeoIPAutoUpdater.update,ERROR: GeoIPAutoUpdater: failed to download ’ http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz’ to ‘/var/www/html/piwik/misc/GeoIPCity.dat.dat.gz’: curl_exec: Protocol http not supported or disabled in libcurl

For info I submitted a bug report (4805) for this problem: