{"record":{"id":"aa1acc374e9e169d","repo":"Seldaek/monolog","slug":"the-curl-extension-is-required-to-use-http-urls-wi","errorCode":null,"errorMessage":"The curl extension is required to use http URLs with the CubeHandler","messagePattern":"The curl extension is required to use http URLs with the CubeHandler","errorType":"exception","errorClass":"MissingExtensionException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/CubeHandler.php","lineNumber":96,"sourceCode":"            throw new \\LogicException('Unable to create a socket');\n        }\n\n        $this->udpConnection = $udpConnection;\n        if (!socket_connect($this->udpConnection, $this->host, $this->port)) {\n            throw new \\LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port);\n        }\n    }\n\n    /**\n     * Establish a connection to an http server\n     *\n     * @throws \\LogicException           when unable to connect to the socket\n     * @throws MissingExtensionException when no curl extension\n     */\n    protected function connectHttp(): void\n    {\n        if (!\\extension_loaded('curl')) {\n            throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler');\n        }\n\n        $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put');\n        if (false === $httpConnection) {\n            throw new \\LogicException('Unable to connect to ' . $this->host . ':' . $this->port);\n        }\n\n        $this->httpConnection = $httpConnection;\n        curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, \"POST\");\n        curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true);\n    }\n\n    /**\n     * @inheritDoc\n     */\n    protected function write(LogRecord $record): void\n    {\n        $date = $record->datetime;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/CubeHandler.php#L78-L114","documentation":"Error \"The curl extension is required to use http URLs with the CubeHandler\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/CubeHandler.php:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}