|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41892 url parsing bug
Submitted: 2007-07-04 09:04 UTC Modified: 2007-07-07 20:18 UTC
From: a dot fokin at new-vision dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.2.3 OS: windows
Private report: No CVE-ID: None
 [2007-07-04 09:04 UTC] a dot fokin at new-vision dot com
when i try to http authenticate by url with user name, containing '@', i got '6' returned.

Reproduce code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
$errno = curl_errno($ch);
echo $errno;

Expected result:
You have reached this web page by typing "", "", or "" into your web browser.

These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3.

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-04 11:53 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

 [2007-07-05 06:09 UTC] a dot fokin at new-vision dot com
I am 99,5% sure, that this is not a support or development question.

When i use - everything is fine,
but when i use - curl reads it as if username is `111`, no password given and actual url (host) is ``, which is wrong url parsing.

I'm not asking here for help or feedback (in some case ;)). Just want to make sure, that you actually read current "bogus" description and understand what is the problem. 

And sorry for spam if i am wrong ;).
 [2007-07-07 19:34 UTC] a dot fokin at new-vision dot com
since i got no reaction to the last comment, i'm opening this thing again.

Any kind of reaction would be nice... even 'stop spamming, it is really not a bug' will perfectly satisfy me ;)
 [2007-07-07 19:53 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

1. You have to encode the @ using urlencoding
2. PHP just passes the string to curl so if there'S something wrong it's curl not PHP.
 [2007-07-07 20:18 UTC] a dot fokin at new-vision dot com
Really really sorry for that bogus. Next time ill probably trible-check the documentation. It will never happen again (i hope). Everything works just fine and thanks for extra fast reply, that helped a lot ;).
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Mar 01 02:01:23 2021 UTC