title: Ioncube not working with mysqli
body: <p>I using Ioncube for scripts obfuscation and working but if script have a mysqli functions(db, connect or etc.), not working. 
  example for worked script:</p>
  
  <pre><code>&lt;?php
  session_start();
  
  $errorMessage = "";
  header('Content-Type: text/html; charset=utf-8');
  
  include_once('language.php');
  
  if (isset($_SESSION['logged_in']) &amp;&amp; $_SESSION['logged_in'] === true) {
     header('Location: index.php');
  }
  
  require_once('config.php');
  if (isset($_POST['Username']) &amp;&amp; isset($_POST['Password'])){
      $log_username = $_POST['Username'];
      $log_password = $_POST['Password'];
  
      if($log_username == $username &amp;&amp; $log_password == $password){
          $_SESSION['logged_in'] = true;
          header('Location: index.php');
      }else{
          $errorMessage="Wrong username/password.";
      }       
  }
  </code></pre>
  
  <p>And not work:</p>
  
  <pre><code>require_once("config.php");
  
  $db = new mysqli($mysql_host, $mysql_user, $mysql_password) or die(__LINE__ . ' Invalid connect: ' . mysqli_error());
  $db-&gt;select_db($mysql_database) or die( "Unable to select database. Run setup first.");
  
  $stmt = $db-&gt;prepare("SELECT * FROM messages WHERE status = 0");
  $success = $stmt-&gt;execute();
  $stmt-&gt;store_result(); 
  $num_rows_victim = $stmt-&gt;num_rows;
  $stmt-&gt;close();
  </code></pre>
  
  <p>It gives such an error message:</p>
  
  <pre><code>[04-Dec-2016 11:15:26 Europe/Moscow] PHP Fatal error:  Class '[obfuscated]' not found in /home/u6820440/public_html/test/index.php on line 0
  </code></pre>
  
  <p>I looked for all forums but I did not find any solution.</p>