Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-655

[PHP] cubrid_connect_with_url() doesn't work properly with paramters $user_id and $passwd

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: PHP 8.4.4.0001
    • Fix Version/s: PHP 8.4.4.0002
    • Component/s: PHP Driver
    • Labels:
    • Environment:
      • OS: Linux 64 bit
      • CUBRID: 8.4.4.1001
      • PHP: 5.5.0
      • Driver: cubrid-php 8.4.4.0002 (20130903)

      Description

      • Brief: The cubrid_connect_with_url() returns an CCI warning when connect with the parameters $user_id and $passwd
      • Test Code
        $conn_url = "CUBRID:localhost:33000:demodb";
        $user = "dba";
        $passwd = "";
        $conn = cubrid_connect_with_url($conn_url, $user, $passwd);
        var_dump($conn);
        
      • Expected Result:
        resource(2) of type (CUBRID Connect) 
        
      • Actual Result
        Warning: Error: CCI, -30, Invalid url string 
        

        Activity

        Hide
        ryin005 Ray Yin added a comment - - edited

        It seems like we must use triple colons ":::" at the end of the connection string, such as:

        $conn_url = "CUBRID:localhost:33000:demodb:::";
        $user = "dba";
        $passwd = "";
        $conn = cubrid_connect_with_url($conn_url, $user, $passwd);
        var_dump($conn);
        

        In this case, the connection is opened successfully

        However, the connection should be also opened with a connection string "CUBRID:localhost:33000:demodb"

        It is a bug since we don't have any specification that we must use ":::" at the end of the connection string, e.g. http://www.php.net/manual/en/function.cubrid-connect-with-url.php

        Show
        ryin005 Ray Yin added a comment - - edited It seems like we must use triple colons ":::" at the end of the connection string, such as: $conn_url = "CUBRID:localhost:33000:demodb:::"; $user = "dba"; $passwd = ""; $conn = cubrid_connect_with_url($conn_url, $user, $passwd); var_dump($conn); In this case, the connection is opened successfully However, the connection should be also opened with a connection string "CUBRID:localhost:33000:demodb" It is a bug since we don't have any specification that we must use ":::" at the end of the connection string, e.g. http://www.php.net/manual/en/function.cubrid-connect-with-url.php
        Hide
        cn15800 谢韦华[Bert] added a comment -

        after modify:

        <para>
        If user or password is empty,you can't delete "<literal>:</literal>",the following is
        an example.
        </para>
        <para>
        $url = "CUBRID:localhost:33000:demodb:::";
        </para>

        Show
        cn15800 谢韦华[Bert] added a comment - after modify: <para> If user or password is empty,you can't delete "<literal>:</literal>",the following is an example. </para> <para> $url = "CUBRID:localhost:33000:demodb:::"; </para>
        Hide
        ryin005 Ray Yin added a comment -

        Add a case for this issue

        [php@NC-PL-QA-012 _14_issues]$ svn ci --username cn14323 -m "[APIS-655] add a case to test the empty password in cubrid_connect_with_url"
        Adding         _14_issues/_13_2H
        Adding         _14_issues/_13_2H/apis_655.phpt
        Transmitting file data .
        Committed revision 36552.
        

        Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/PHP/scenario/php/_14_issues/_13_2H/apis_655.phpt

        Show
        ryin005 Ray Yin added a comment - Add a case for this issue [php@NC-PL-QA-012 _14_issues]$ svn ci --username cn14323 -m "[APIS-655] add a case to test the empty password in cubrid_connect_with_url" Adding _14_issues/_13_2H Adding _14_issues/_13_2H/apis_655.phpt Transmitting file data . Committed revision 36552. Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/PHP/scenario/php/_14_issues/_13_2H/apis_655.phpt
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Linux 64
        • CUBRID: 8.4.4.0227
        • PHP: 5.5.0
        • Driver: cubrid-php 8.4.4.0002 (2013-11-22)

        Test Result: Pass

        Close the issue

        Show
        ryin005 Ray Yin added a comment - Test OS: Linux 64 CUBRID: 8.4.4.0227 PHP: 5.5.0 Driver: cubrid-php 8.4.4.0002 (2013-11-22) Test Result: Pass Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
            CC (Referrer):
            andrew liu, Isaiah Choe, 范再强
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: