Page MenuHomePhabricator

Fatal error: Call to undefined function curl_strerror() in /srv/mediawiki/php-1.26wmf15/includes/libs/MultiHttpClient.php on line 232
Closed, ResolvedPublic

Description

Fatal error: Call to undefined function curl_strerror() in /srv/mediawiki/php-1.26wmf15/includes/libs/MultiHttpClient.php on line 232

The error was introduced in rMWdb2d4b670983: Fix MultiHttpClient to return correct errors

curl_strerror was added in php 5.5, and it appears to be supported in hhvm as well, so I'm really not sure why this is an undefined function.

Event Timeline

mmodell created this task.Jul 22 2015, 7:12 PM
mmodell updated the task description. (Show Details)
mmodell raised the priority of this task from to Needs Triage.
mmodell added subscribers: mmodell, Nikerabbit.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 22 2015, 7:12 PM

curl_strerror was added in php 5.5, and it appears to be supported in hhvm as well, so I'm really not sure why this is an undefined function.

Because Wikimedia doesn't run php5.5/hhvm everywhere and still has a load of zend php5.3 machines?

So what is wrong with this check in the code: if ( version_compare( PHP_VERSION, '5.5.0' ) >= 0 ) { call it }?

What is PHP_VERSION on production?

Krenair added a comment.EditedJul 22 2015, 7:36 PM

What is PHP_VERSION on production?

One of these:

5.3.10-1ubuntu3.19+wmf1
5.5.9-1ubuntu4.11
5.6.99-hhvm

I'm still confused:

> var_dump( version_compare( '5.6.99-hhvm', '5.5.0' ) );
int(1)

> var_dump( version_compare( '5.5.9-1ubuntu4.11', '5.5.0' ) );
int(1)

> var_dump( version_compare( '5.3.10-1ubuntu3.19+wmf1', '5.5.0' ) );
int(-1)

Which one of the above does not have it?

Change 226348 had a related patch set uploaded (by Nikerabbit):
Use feature test rather than version check

https://gerrit.wikimedia.org/r/226348

Change 226348 merged by Aaron Schulz:
Use feature test rather than version check

https://gerrit.wikimedia.org/r/226348

I'm going to backport this to wmf15

Change 226388 had a related patch set uploaded (by 20after4):
Use feature test rather than version check

https://gerrit.wikimedia.org/r/226388

Change 226388 merged by 20after4:
Use feature test rather than version check

https://gerrit.wikimedia.org/r/226388

mmodell closed this task as Resolved.Jul 22 2015, 8:26 PM
mmodell claimed this task.