|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76492 CURLOPT_VERBOSE cannot be set
Submitted: 2018-06-18 09:26 UTC Modified: 2018-06-18 13:46 UTC
From: adrian dot burla at gmail dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 7.2.6 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: adrian dot burla at gmail dot com
New email:
PHP Version: OS:


 [2018-06-18 09:26 UTC] adrian dot burla at gmail dot com
CURL_VERBOSE cannot be set.

The test script throws an error: 
Warning: Use of undefined constant  CURLOPT_VERBOSE - assumed ' CURLOPT_VERBOSE' (this will throw an Error in a future version of PHP) in C:\Projects\Project1\custom_lib.php on line 530

Warning: curl_setopt() expects parameter 2 to be integer, string given in C:\Projects\Project1\custom_lib.php on line 530

Tried as parameter 2: true, TRUE, 1, '1'

OS: Windows Server 2016, Windows 10
Running in command prompt or power shell.

The other options I set do work, I need VERBOSE to debug a problem with CURL that appears in 7.2.6 and worked in 7.0.x and 7.1.x.

Test script:
$curl = curl_init();
curl_setopt($curl, CURLOPT_VERBOSE, 1);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-18 09:31 UTC]
-Status: Open +Status: Feedback
 [2018-06-18 09:31 UTC]
Delete the line and type it again.
 [2018-06-18 12:38 UTC] adrian dot burla at gmail dot com
It works; I checked the old file, there is no strange character in it, no explanation for the behavior. What is causing this?
 [2018-06-18 13:46 UTC]
-Status: Feedback +Status: Not a bug
 [2018-06-18 13:46 UTC]
Notice the unusual space before the name of the constant in the error message? Twice? It's likely a 0xA0 non-breaking space - most often caused by hitting shift+space using a word processor. It's a valid byte for identifiers in PHP which is why there wasn't a syntax error.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Apr 22 12:01:23 2021 UTC