Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13007

Database warning, while closing the connection in cli script for ezmysqli support

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High
    • None
    • 4.0.0
    • Cronjobs, Database related
    • None
    • Operating System: Linux
      PHP Version: (please be specific, like '5.2.x5')
      Database and version: mysql 5.0.51a
      Browser (and version):

    Description

      Try to get sql query result of any cli script, it gives following warning.

      Warning: mysqli_close(): Couldn't fetch mysqli in /home/projects/ez400/lib/ezdb/classes/ezmysqlidb.php on line 898
      
      Call Stack:
          0.0003      66620   1. {main}() /home/projects/ez400/dbconv_gv.php:0
          0.1108    2477432   2. eZMySQLiDB->close() /home/projects/ez400/dbconv_gv.php:13
          0.1110    2477432   3. mysqli_close() /home/projects/ez400/lib/ezdb/classes/ezmysqlidb.php:898
      
      
      
      Steps to reproduce

      Install ezp 4.0/trunk with mysqli database support.
      compile php with xdebug.
      execute following script.

      #!/usr/bin/env php
      <?php
          require 'autoload.php';
          $cli = eZCLI::instance();
          $script = eZScript::instance();
          $script->startup();
          $options = $script->getOptions();
          $db = eZDB::instance();
      
          $selectSQL = "SELECT * FROM ezsite_data";
          $result = $db->arrayQuery( $selectSQL );
          print_r(  $result );
          $db->close();
          unset( $result );
      
          $script->shutdown();
      ?>
      

      warning will be displayed.

      Attachments

        Activity

          People

            andre1 andre1
            gv gv
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: