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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Tue Apr 23 08:01:30 2024 UTC