Can't install - "curl_getinfo() expects parameter 1 to be resource..."

Can’t find any info on this elsewhere, so I hope someone here can help.

I’m trying to install Piwik. The installer tells me that all the requirements are met, it creates the database tables, but immediately after submitting details for the super administrator, I’m met with a page of plain text containing the following:


curl_getinfo() expects parameter 1 to be resource, null given 
in '/home/piwik/public_html/core/Http.php' at the line 457

#0  Piwik_ErrorHandler(...) called at [:]
#1  curl_getinfo(...) called at [/home/piwik/public_html/core/Http.php:457]
#2  Piwik_Http::sendHttpRequestBy(...) called at [/home/piwik/public_html/core/Http.php:73]
#3  Piwik_Http::sendHttpRequest(...) called at [/home/piwik/public_html/plugins/Installation/Controller.php:405]
#4  Piwik_Installation_Controller->generalSetup(...) called at [/home/piwik/public_html/plugins/Installation/Installation.php:72]
#5  Piwik_Installation->dispatch(...) called at [:]
#6  call_user_func_array(...) called at [/home/piwik/public_html/libs/Event/Dispatcher.php:213]
#7  Event_Dispatcher->addObserver(...) called at [/home/piwik/public_html/core/PluginsManager.php:458]
#8  Piwik_PluginsManager->addPluginObservers(...) called at [/home/piwik/public_html/core/PluginsManager.php:330]
#9  Piwik_PluginsManager->reloadPlugins(...) called at [/home/piwik/public_html/core/PluginsManager.php:219]
#10  Piwik_PluginsManager->loadPlugins(...) called at [/home/piwik/public_html/core/FrontController.php:270]
#11  Piwik_FrontController->init(...) called at [/home/piwik/public_html/index.php:52]

Any ideas?

Are you using 1.7.1 ?

Yes. I downloaded latest.zip from the Piwik home page just an hour ago.

It’s strange because core/Http.php’ at the line 457 I don’t see the function curl_getinfo() ?

please replace this file by the SVN file: http://dev.piwik.org/svn/trunk/core/Http.php

do you still get this error or a different one?

OK. I deleted the entire contents (502 lines of code) from core/Http.php, and inserted the code you suggested (from dev.piwik.org/svn/trunk/core/Http.php).

I then removed all the tables from the database (which has been added by last night’s installation) - so, starting out again with an empty database.

The Installer’s System Check gave me the following (understandable) warning:

File integrity check failed and reported some errors. This is most likely due to a partial or failed upload of some of the Piwik files. You should reupload all the Piwik files in BINARY mode and refresh this page until it shows no error.
Details: File size mismatch: /home/piwik/public_html/core/Http.php (expected length: 14092, found: 13701)

I ignored this and continued.

The installer has still failed immediately after the form asking for super-user details. This time, I get the error:

Fatal error: Call to undefined method Piwik_Config::getInstance() in /home/piwik/public_html/core/Http.php on line 112

In case it’s helpful, I’ve added a phpinfo file to the installation: http://piwik.angelica.ecodis.net/phpinfo.php

And, btw, thanks for your help - very much appreciated :slight_smile:

Sorry my bad, please replace http.php by the following file:

Does it work ?

Thanks so much Matt. That did it.

Obviously got the file integrity warning about the changed core/Http.php file. But otherwise the install process ran smoothly, and I now appear to have a fully functioning Piwik install.

What do you think might have been the problem?

Curl_init is disabled.

Cheers vipsoft - will raise that with the chaps managing my server :slight_smile: