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

cubrid_connect_with_url example does not have updated connection url

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PHP 9.1.0 0004
    • Component/s: PHP Driver
    • Labels:
      None
    • Environment:

      CUBRID 9.1

      Description

      http://www.php.net/manual/en/function.cubrid-connect-with-url.php

      {code}
      $conn_url = "CUBRID:localhost:33000:demodb:public:123456";{code}

      The url format is incorrect. It is missing a ":" at the end.

      {code}
      $conn_url = "CUBRID:localhost:33000:demodb:public:123456:";{code}

      gives the error that the password is incorrect or missing (which is expected since public has no password in my case).

        Activity

        Hide
        ovidiu.veliscu Veliscu Ovidiu added a comment -

        The second example is missing a ";" after the line:

        {code}
        $conn_url = "CUBRID:127.0.0.1:33000:demodb:public:123456:?althost=10.34.63.132:33088&rctime=100"{code}

        It gives "Warning: Error: CCI, -20030, Invalid url string in C:\Users\user\Desktop\PHP Driver Tests\cubrid_connect_with_url2.php on line 3" anyway after the ";" is added. I tried adding another ":" but it still didn't work.

        Show
        ovidiu.veliscu Veliscu Ovidiu added a comment - The second example is missing a ";" after the line: {code} $conn_url = "CUBRID:127.0.0.1:33000:demodb:public:123456:?althost=10.34.63.132:33088&rctime=100"{code} It gives "Warning: Error: CCI, -20030, Invalid url string in C:\Users\user\Desktop\PHP Driver Tests\cubrid_connect_with_url2.php on line 3" anyway after the ";" is added. I tried adding another ":" but it still didn't work.
        Hide
        ovidiu.veliscu Veliscu Ovidiu added a comment -
        {code}
        CUBRID:localhost:33000:demodb:public::?autocommit=off{code}

        does not work either, so I assume the other 2 samples from the Note section won't work.

        Show
        ovidiu.veliscu Veliscu Ovidiu added a comment - {code} CUBRID:localhost:33000:demodb:public::?autocommit=off{code} does not work either, so I assume the other 2 samples from the Note section won't work.
        Hide
        cn15800 谢韦华[Bert] added a comment - - edited

        CUBRID:localhost:33000:demodb:public::?autocommit=off

        cci (cci_connect_with_url_ex) can not support autocommit as parameter, so php driver can not support the feature.

        We only modify the first issue:

        $conn_url = "CUBRID:localhost:33000:demodb:public:123456"; // It is missing a ":"

        and modofy the note

        Note:

        ? and : that are used as identifiers in PHP connection URL can't be included in the password. The following is an example of a password that is invalid to use as connection URL because it contains "?:".

        $url = "CUBRID:localhost:33000:tdb:dba:12?:?login_timeout=100";

        Passwords that contain ? or : may be passed as a seperate parameter.

        $url = "CUBRID:localhost:33000:tbd:::?login_timeout=100";

        $conn = cubrid_connect_with_url($url, "dba", "12?");

        Show
        cn15800 谢韦华[Bert] added a comment - - edited CUBRID:localhost:33000:demodb:public::?autocommit=off cci (cci_connect_with_url_ex) can not support autocommit as parameter, so php driver can not support the feature. We only modify the first issue: $conn_url = "CUBRID:localhost:33000:demodb:public:123456"; // It is missing a ":" and modofy the note Note: ? and : that are used as identifiers in PHP connection URL can't be included in the password. The following is an example of a password that is invalid to use as connection URL because it contains "?:". $url = "CUBRID:localhost:33000:tdb:dba:12?:?login_timeout=100"; Passwords that contain ? or : may be passed as a seperate parameter. $url = "CUBRID:localhost:33000:tbd:::?login_timeout=100"; $conn = cubrid_connect_with_url($url, "dba", "12?");
        Hide
        ryin005 Ray Yin added a comment - - edited

        The Example #2 on http://www.php.net/manual/en/function.cubrid-connect-with-url.php is "Example #2 cubrid_connect_with_url() url with properties example", but there isn't any property in the connection url string

        Currently the Example #2 is same as the Example #1 in fact

        Need to modify the Example #2
        From:

        {code}
        $conn_url = "CUBRID:127.0.0.1:33000:demodb:dba::" // no properties, also missed a semi-colon here
        $con = cubrid_connect_with_url ($conn_url); // there is an undesired space {code}

        To (e.g.):

        {code}
        $conn_url = "CUBRID:127.0.0.1:33367:demodb:dba::?login_timeout=100";
        $con = cubrid_connect_with_url($conn_url); {code}

        Reopen the issue

        Show
        ryin005 Ray Yin added a comment - - edited The Example #2 on http://www.php.net/manual/en/function.cubrid-connect-with-url.php is "Example #2 cubrid_connect_with_url() url with properties example" , but there isn't any property in the connection url string Currently the Example #2 is same as the Example #1 in fact Need to modify the Example #2 From: {code} $conn_url = "CUBRID:127.0.0.1:33000:demodb:dba::" // no properties, also missed a semi-colon here $con = cubrid_connect_with_url ($conn_url); // there is an undesired space {code} To (e.g.): {code} $conn_url = "CUBRID:127.0.0.1:33367:demodb:dba::?login_timeout=100"; $con = cubrid_connect_with_url($conn_url); {code} Reopen the issue
        Hide
        cn15800 谢韦华[Bert] added a comment -

        This issue is to fix the invalid url.

        If you want to modify other document, it'e best to create another issue.

        Show
        cn15800 谢韦华[Bert] added a comment - This issue is to fix the invalid url. If you want to modify other document, it'e best to create another issue.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        fixed

        Show
        cn15800 谢韦华[Bert] added a comment - fixed
        Hide
        ryin005 Ray Yin added a comment -

        The document has been updaed.

        Close the issue

        Show
        ryin005 Ray Yin added a comment - The document has been updaed. Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ovidiu.veliscu Veliscu Ovidiu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: