Page MenuHomePhabricator

Better error message for VisualEditor when php7.0-curl package is missing
Open, LowestPublic1 Estimated Story Points


In MediaWiki 1.28.0 under Ubuntu 16.04 LTS, VisualEditor fails to connect to parsoid if the server is missing the package php7.0-curl. When this happens, the error behavior is mysterious, so I suggest that the error message should be improved.

The only user-visible error is a JavaScript alert box that says:

hostname replied: "http"

No errors appear in /var/log/apache/error.log nor in /var/log/parsoid.

The only useful error can be seen only by examining the network traffic between VisualEditor and parsoid, where this error appears:

Call to undefined function curl_init()

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 22 2016, 4:13 PM
Jdforrester-WMF triaged this task as Lowest priority.Feb 28 2017, 8:18 PM
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Not sure if we can express a dependency on curl via extension.json?

@Legoktm, do you know if this would be possible?

No, not via extension.json. I would recommend just adding a if !extension_loaded('curl') { throw new Exception('curl is missing!')} block somewhere in the API module early on or fix T139169: Add non-parallel MultiHttpClient fallback for environments that don't have curl available properly.