diff --git a/include/database/PearDatabase.php b/include/database/PearDatabase.php
index 6e590733dfbe2c178eb4a3eeaf7eea65ef34f67f..218429d7b75910ae870f5b4fdd235b5504b59243 100644
--- a/include/database/PearDatabase.php
+++ b/include/database/PearDatabase.php
@@ -810,6 +810,16 @@ class PearDatabase{
 		if ($this->database->clientFlags == 0 && isset($dbconfigoption['clientFlags'])) {
 			$this->database->clientFlags = $dbconfigoption['clientFlags'];
 		}
+
+		if ($this->dbType == 'mysqli') {
+			$optionFlags = array();
+			if ($this->database->optionFlags) {
+				$optionFlags = $this->database->optionFlags;
+			}
+
+			$optionFlags = array_merge($optionFlags, array(array(MYSQLI_OPT_LOCAL_INFILE, true)));
+			$this->database->optionFlags = $optionFlags;
+		}
 		// End
 
 		$result = $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName);