Fatal error: Uncaught Error: Class 'PDO' not found in /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php:112 Stack trace: #0 /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php(42): MyDatabase::myMysqlConnect('localhost', 'sinderelarekon_...', 'ZKR4AxGDt]bz', 'sinderelarekon_...') #1 /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php(178): MyDatabase::myReconnect() #2 /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php(1458): MyDatabase::myMysqlQuery('SELECT * FROM `...') #3 /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php(1193): MyAdmin::myExecuteQuery('SELECT * FROM `...') #4 /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php(333): MyAdmin::myGenerateQuerySelect('sinderelarekon_...', 'table_project', Array, Array) #5 /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php(290): MyAdmin::getAllProject() #6 /home/sinderelarekon/app/admin/Projects/sinderela/appConfig.inc.php(23): MyAdmin::getDatabase('sinderela') #7 /home/sinderelarekon/app/admin/Core/Inclu in /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php on line 112
Uncaught Error: Class 'PDO' not found in /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php:112 at /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php on line 112
File : /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php
Line : 112
99. $server = isset($option['server']) ? $option['server'] : self::$server;
100. $username = isset($option['username']) ? $option['username'] : self::$username;
101. $password = isset($option['password']) ? $option['password'] : self::$password;
102. $database = isset($option['database']) ? $option['database'] : self::$database;
103. $cookie = isset($option['cookie']) ? $option['cookie'] : true;
104.
105. if(isset(self::$this_connection[$database])){
106. self::$myMySqli = self::$this_connection[$database];
107. return true;
108. }
109. try {
110. AppBenchmark()::start('Database Connection');
111.
112. $mysqli = new PDO("mysql:host=".$server.";dbname=".$database.";charset=utf8mb4", $username, $password);
113. $mysqli->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
114. $mysqli->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
115. if($cookie){
116. self::$myMySqli = $mysqli;
117. self::$this_connection[$database] = $mysqli;
118. }
119. $mysqli = null;
120. AppBenchmark()::end('Database Connection');
121. return true;
122. }
123. catch (PDOException $e) {
124. self::$myMysqliError[] = "connect DB error : ".$e->getMessage();
125. return false;
126. }
127. }
Backtrace
File : /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php
Line : 42
29. myPrintR(self::$this_connection);
30. myPrintR(self::$all_query);
31. }
32.
33. public static function GetAllQuery(){
34. return self::$all_query;
35. }
36.
37. public static function GetAllQueryCount(){
38. return self::$all_query_count;
39. }
40.
41. public static function myReconnect(){
42. self::myMysqlConnect(self::$server, self::$username, self::$password, self::$database);
43. }
44.
45. public static function myGetCompleteTableLoad($db){
46. if(isset(self::$complete_table_load[$db])) return true;
47. return false;
48. }
49.
50. public static function mySetCompleteTableLoad($db){
51. if(!isset(self::$complete_table_load[$db])) self::$complete_table_load[$db] = true;
52. }
53.
54. public static function myGetTables(){
55. return self::$myTables;
56. }
57. public static function mySetTables($tables){
File : /home/sinderelarekon/app/admin/Core/Asset/MyDatabase.class.php
Line : 178
165.
166. public static function myCheckMaskingId($query){
167. $find = [];
168. $all_id = myGetTagContent($query, self::$myEncryptIdTagOpen, self::$myEncryptIdTagClose);
169. foreach ($all_id as $key => $value) {
170. if(myDecryptString($value) == '' ) return false;
171. }
172. return true;
173. }
174.
175. public static function myMysqlQuery($query, $return_id = false, $error = true){
176. $real_query = $query;
177. if(!isset(self::$myMySqli)){
178. self::myReconnect();
179. }
180. $mysqli = self::$myMySqli;
181. $exp = explode(" ",trim($query));
182. $type = $exp[0];
183.
184. $execute_start = 0;
185.
186. if(MY_DEBUG_STATE){
187. // app_log($query, 2);
188. }
189.
190. try {
191. $temp_query = $query;
192. $all_id = myGetTagContent($temp_query, self::$myEncryptIdTagOpen, self::$myEncryptIdTagClose);
193. foreach ($all_id as $key_id => $value_id) {
File : /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php
Line : 1458
1445. $temp_return[$key_temp_return]['target'] = array_merge($temp_return[$key_temp_return]['target'], $temp_duplicate);
1446. }
1447. }
1448. else{
1449. $temp_return[$key_temp_return]['duplicate_target'] = true;
1450. $temp_return[$key_temp_return]['target'] = array_merge($temp_return[$key_temp_return]['target'], $temp_duplicate);
1451. }
1452. }
1453. }
1454. return array_merge($foreign_field, $temp_return);
1455. }
1456.
1457. public static function myExecuteQuery($query){
1458. return MyDatabase::myMysqlQuery($query);
1459. }
1460.
1461. public static function myExecuteQueryNoError($query){
1462. return MyDatabase::myMysqlQuery($query, false, false);
1463. }
1464.
1465. public static function myExecuteQueryInsert($query, $return_id = false){
1466. return MyDatabase::myMysqlQuery($query, $return_id);
1467. }
1468.
1469. public static function myExecuteQueryDelete($query){
1470. if(is_array($query)){
1471. foreach ($query as $key => $value) {
1472. if($value == '') continue;
1473. MyDatabase::myMysqlQuery($value);
File : /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php
Line : 1193
1180. $limit_string = '';
1181. if(is_array($limit)){
1182. if(count($limit) == 2) $limit_string = ' limit '.implode(',', $limit);
1183. }
1184. else if(!is_null($limit) && $limit !== ''){
1185. $limit_string = ' limit '.$limit;
1186. }
1187.
1188. $temp_query = "SELECT ".implode(",", $select)." FROM `".$database."`.`$table` $join_type ".implode($join_type, $join)." $where_string ".implode(" ", $where)." ".$group_by_string." ".$having_codition." ".$order_by_string.$limit_string;
1189. if($return_query){
1190. return $temp_query;
1191. }
1192.
1193. $query = self::myExecuteQuery($temp_query) or die(MyDatabase::myMysqlError());
1194. while ($data = MyDatabase::myMysqlFetchAssoc($query)) {
1195. $temp_array[] = $data;
1196. }
1197. return $temp_array;
1198. }
1199.
1200. public static function myGenerateQueryUpdate($database = null, $table, $array, $where = array()){
1201. $database = is_null($database) ? MyDatabase::myGetDatabase() : $database ;
1202.
1203. $new_array = "";
1204. $length = count($array);
1205. $no = 0;
1206. $primary = self::myGetPrimary($database, $table);
1207.
1208. $where_string = "";
File : /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php
Line : 333
320. }
321.
322. public static function getAllProject(){
323.
324. // self::$data_project = session()->get([
325. // 'MASTER-ADMIN',
326. // 'ALL-PROJECT'
327. // ]);
328.
329. if(self::$data_project != null){
330. return self::$data_project;
331. }
332.
333. $query_project = self::myGenerateQuerySelect(null, \_Names::$table_project, array("*"), array());
334. foreach ($query_project as $key => $value) {
335. $index = $value[\_Names::$project_alias_field];
336. $query_project[$index] = $value;
337. unset($query_project[$key]);
338. }
339.
340. self::$data_project = $query_project;
341.
342. // session()->set([
343. // 'MASTER-ADMIN',
344. // 'ALL-PROJECT'
345. // ], self::$data_project);
346.
347. return $query_project;
348. }
File : /home/sinderelarekon/app/admin/Core/Asset/MyAdmin.class.php
Line : 290
277. $temp_table = $data_setting['table_name'];
278. $temp_array[$temp_module] = $temp_table;
279. }
280. self::$table_module[$project] = $temp_array;
281. return isset($temp_array[$module]) ? $temp_array[$module] : $module;
282. }
283.
284. return $module;
285. }
286.
287. public static function getDatabase($project){
288.
289. if(self::$data_project == null){
290. self::getAllProject();
291. }
292. return self::$data_project[$project][\_Names::$project_database_field] ?? '';
293. }
294.
295. public static function getProjectId($project){
296. if(self::$data_project == null){
297. self::getAllProject();
298. }
299.
300. if(!isset(self::$data_project[$project])) return false;
301. return self::$data_project[$project][\_Names::$project_id_field];
302. }
303.
304. public static function getProject($project){
305. if(self::$data_project != null){
File : /home/sinderelarekon/app/admin/Projects/sinderela/appConfig.inc.php
Line : 23
10. "additional_field_form_editor" => [
11. ],
12. "after_login" => function(){
13. },
14. 'table_user_setting_module' => 'module_pengguna',
15. 'table_user_setting' => [
16. 'skip_field' => [
17. 'phone_number', 'email', "login_time", "login_state", "login_type", "user_image", 'full_username', 'status', 'two_factor_auth', 'status_user'
18. ],
19. 'additional_table_field' => [
20. 'nama_lengkap' => [
21. 'field' => 'nama_lengkap',
22. 'table' => 'tabel_pengguna',
23. 'database' => \MyAdmin::getDatabase(THIS_PROJECT)
24. ],
25. 'nama_dinas_uptd' => [
26. 'field' => 'nama_dinas_uptd',
27. 'table' => 'tabel_dinas_uptd',
28. 'database' => \MyAdmin::getDatabase(THIS_PROJECT)
29. ]
30. ],
31. 'additional_join_table' => [
32. 'id_pengguna' => [
33. 'foreign' => 'tabel_pengguna',
34. 'foreign_primary' => 'user_id',
35. 'primary' => 'user_id',
36. 'table' => 'table_user',
37. 'database' => \MyAdmin::getDatabase(THIS_PROJECT)
38. ],