php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53080 Error when request on port 3306
Submitted: 2010-10-15 23:45 UTC Modified: 2010-10-16 09:47 UTC
From: kevinpleiter at gmail dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: Irrelevant OS: Windows XP
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kevinpleiter at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-15 23:45 UTC] kevinpleiter at gmail dot com
Description:
------------
When I get a request from a host which is using mysql, I'll get an error I can't turn off ("R (strange chars) Host 'XXXXX' is not allowed to connect to this MySQL server"). I can't suppress this error.

Test script:
---------------
$host = 'www.hostUSINGmysql.com'; // for example www.schutterijkleintuindorp.nl

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_PORT, 3306);
$test = curl_exec($ch);
        if(!empty($test))
        {
            $page .= 'JA - 3306<br />';
        }
        else
        {
            $page .= 'Nee - 3306<br />';
        }
echo $page;
    curl_close($ch);


Expected result:
----------------
Getting JA - 3306 or NEE 3306


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-16 09:47 UTC] cataphract@php.net
-Status: Open +Status: Bogus
 [2010-10-16 09:47 UTC] cataphract@php.net
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 http://www.php.net/support.php 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.

curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);

should be

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

otherwise the response is printed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 12:01:32 2024 UTC