This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136807 - 'localhost:3306' is incorrect value for mysqli_connect procedure
Summary: 'localhost:3306' is incorrect value for mysqli_connect procedure
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-09 12:45 UTC by Victoria Zhukovskaya
Modified: 2008-06-16 11:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victoria Zhukovskaya 2008-06-09 12:45:57 UTC
I use AirAlliance datebase for testing. And this sample.

1. Create php file. press Alt+Ins.Select Connection to Database ...
2. Select jdbc:mysql://localhost:3306/AirAlliance and press OK

Result:
$conn2 = mysqli_connect('localhost:3306', 'root', 'adminadmin', 'AirAlliance');
    if (!$conn2) {
        die('Could not connect to MySQL: ' . mysqli_connect_error());
    }
    mysqli_query($conn2, 'SET NAMES \'UTF-8\'');
    // TODO: insert your code here.
    mysqli_close($conn2);

This code does not work. If change 'localhost:3306' to 'localhost'
See there is 'localhost:3306' value in  mysqli_connect procedure


mysqli_connect  function has this Description:
mysqli mysqli_connect  ([ string $host  [, string $username  [, string $passwd  [, string $dbname  [, int $port  [,
string $socket  ]]]]]] )

NB
invoke
mysqli_connect('localhost', 'root', 'adminadmin', 'AirAlliance', 3306);

it works.
Comment 1 Victoria Zhukovskaya 2008-06-09 12:48:49 UTC
Product Version: NetBeans IDE Dev (Build 080609)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 2 Victoria Zhukovskaya 2008-06-09 12:50:01 UTC
mysqli_connect works if change 'localhost:3306' to 'localhost' 
Comment 3 Andrei Badea 2008-06-10 11:23:33 UTC
Fixed already.

ab3713594a42
Comment 4 Petr Jiricka 2008-06-10 14:59:06 UTC
So should it be marked as fixed?
Comment 5 Andrei Badea 2008-06-10 15:03:10 UTC
Yes, thanks for reminding.
Comment 6 Victoria Zhukovskaya 2008-06-14 12:12:46 UTC
verified.

result is
mysqli_connect('localhost', 'root', 'adminadmin', '3306');