Last modified: 2014-09-24 12:30:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73221, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71221 - Fatal error: Call to undefined function Elastica\Transport\curl_init()
Fatal error: Call to undefined function Elastica\Transport\curl_init()
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
unspecified
PC Linux
: Unprioritized major (vote)
: MW 1.24 version
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-24 06:15 UTC by wp mirror
Modified: 2014-09-24 12:30 UTC (History)
3 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description wp mirror 2014-09-24 06:15:29 UTC
To whom it may concern,

0) Context

I have a working wiki farm that mirrors one or more of the WMF wikis from each project (wikipedia, wikibooks, wikisource, wiktionary, ...). I am now trying to enable Extension:CirrusSearch and Extension:Elastica, with a view to retiring Extension:TitleKey and to enabling Extension:Popups.

1) Elasticsearch

I setup elasticsearch on a separate PC (darkstar-4). Its status is `green'. I can give commands to it using `curl' from the PC where I have the wiki farm.

(shell) curl 'darkstar-4:9200/_cat/health?v'
epoch      timestamp cluster       status node.total node.data shards pri relo init unassign 
1411453848 02:30:48  elasticsearch green           1         1      0   0    0    0        0 

2) MediaWiki extensions

I am following the instructions provided by
<https://www.mediawiki.org/wiki/Extension:CirrusSearch>.

When I append to `LocalSettings.php' the following lines:

require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
$wgCirrusSearchServers = array( 'darkstar-4' );

and then navigate to <http://simple.wikipedia.site/wiki/Special:Version>, I get the following error. If I comment out the above lines, the page renders properly and shows `Elastica' installed but not `CirrusSearch'.

3) Error message

Fatal error: Call to undefined function Elastica\Transport\curl_init() in /usr/share/wp-mirror-mediawiki/extensions/Elastica/Elastica/lib/Elastica/Transport/Http.php on line 183
Call Stack
#	Time	Memory	Function	Location
1	0.0000	232680	{main}( )	../index.php:0
2	0.0468	7406888	MediaWiki->run( )	../index.php:46
3	0.0468	7407952	MediaWiki->main( )	../Wiki.php:452
4	0.0482	7530816	MediaWiki->performRequest( )	../Wiki.php:603
5	0.0877	8342448	SpecialPageFactory::executePath( )	../Wiki.php:288
6	0.0880	8397232	SpecialPage->run( )	../SpecialPageFactory.php:510
7	0.0955	8959456	SpecialVersion->execute( )	../SpecialPage.php:361
8	0.1679	10068912	SpecialVersion::softwareInformation( )	../SpecialVersion.php:128
9	0.1683	10081160	wfRunHooks( )	../SpecialVersion.php:217
10	0.1683	10081208	Hooks::run( )	../GlobalFunctions.php:4056
11	0.1684	10081920	call_user_func_array:{/usr/share/wp-mirror-mediawiki/includes/Hooks.php:206} ( )	../Hooks.php:206
12	0.1684	10082896	CirrusSearch\Hooks::onSoftwareInfo( )	../Hooks.php:206
13	0.4028	10129040	CirrusSearch\Searcher->getElasticsearchVersion( )	../Hooks.php:195
14	0.5084	10217552	Elastica\Client->request( )	../Searcher.php:676
15	0.5142	10230784	Elastica\Request->send( )	../Client.php:587
16	0.5144	10236736	Elastica\Transport\Http->exec( )	../Request.php:168
17	0.5144	10236944	Elastica\Transport\Http->_getConnection( )	../Http.php:51

4) Other notes

Git branch: MediaWiki and most extensions wmf/1.24wmf8; wikidata mw1.24-wmf8.
OS: GNU/Linux 3.14 amd64.
Distribution: Debian jessie (testing).
Relevant packages installed: `curl' `php5-curl'.

I see that `curl_init()' is also mentioned in `includes/HttpFunctions.php', but am not sure which dependency should be providing `curl_init()'.

Sincerely Yours,
Kent
Comment 1 wp mirror 2014-09-24 10:10:20 UTC
5) Fix

5.1) Apparently, I neglected to restart `apache2' after installing `php5-curl'.

(rootshell)# /etc/init.d/apache2 restart

5.2) Now `phpinfo()' shows that `curl' is enabled.

(shel) php --interactive
Interactive mode enabled

php > phpinfo();
...
cURL support => enabled
...

5.3) Now <https://simple.wikipedia.site/wiki/Special:Version> shows both `CirrusSearch' and `Elastica' as installed.

Sincerely Yours,
Kent
Comment 2 Nik Everett 2014-09-24 12:30:57 UTC
Sorry for the trouble!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links