You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "zheyu1995 (via GitHub)" <gi...@apache.org> on 2023/06/30 02:29:26 UTC

[GitHub] [skywalking] zheyu1995 opened a new issue, #11026: [Bug] skywalking-php Unable to capture mysqli_init

zheyu1995 opened a new issue, #11026:
URL: https://github.com/apache/skywalking/issues/11026

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache SkyWalking Component
   
   PHP (apache/skywalking-php)
   
   ### What happened
   
   code
   ```
   <?php
   
   {
           $host = "127.0.0.1";
           $user = "root";
           $pwd = "password";
           $db = "sky";
           $port = 3306;
           $mysqli = mysqli_init();
           if (!$mysqli) {
               die('mysqli_init failed');
           }
   
           if (!$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5)) {
               die('Setting MYSQLI_OPT_CONNECT_TIMEOUT failed');
           }
   
           if (!$mysqli->real_connect($host, $user, $pwd,$db, $port)) {
               die('Connect Error (' . mysqli_connect_errno() . ') '
                   . mysqli_connect_error());
           }
   
           echo 'Success... ' . $mysqli->host_info . "\n";
   
           $result = $mysqli->query("SELECT 1;");
           var_dump($result);
           $mysqli->close();
   }
   ```
   
   ### What you expected to happen
   
   ![image](https://github.com/apache/skywalking/assets/135955826/c2ab8777-6edd-44d2-868d-f36fc1be9ab5)
   
   
   ### How to reproduce
   
    code
   ```
   <?php
   
   {
           $host = "127.0.0.1";
           $user = "root";
           $pwd = "password";
           $db = "sky";
           $port = 3306;
           $mysqli = mysqli_init();
           if (!$mysqli) {
               die('mysqli_init failed');
           }
   
           if (!$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5)) {
               die('Setting MYSQLI_OPT_CONNECT_TIMEOUT failed');
           }
   
           if (!$mysqli->real_connect($host, $user, $pwd,$db, $port)) {
               die('Connect Error (' . mysqli_connect_errno() . ') '
                   . mysqli_connect_error());
           }
   
           echo 'Success... ' . $mysqli->host_info . "\n";
   
           $result = $mysqli->query("SELECT 1;");
           var_dump($result);
           $mysqli->close();
   }
   ```
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng closed issue #11026: [Bug] skywalking-php Unable to capture mysqli_init

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #11026: [Bug] skywalking-php Unable to capture mysqli_init
URL: https://github.com/apache/skywalking/issues/11026


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #11026: [Bug] skywalking-php Unable to capture mysqli_init

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11026:
URL: https://github.com/apache/skywalking/issues/11026#issuecomment-1614034599

   I just read the slack discussion. This is just a proposal. Moving to the discussion channel.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org