Web Sitemin admin paneline girmek istediğimde böyle bir hata alıyorum. bunu nasıl düzeltebilirim bek php bilmem açıklayıcı şekilde anlatıcak arkadaşlara şimdiden teşekkürler.




vt Kodları
<?php
ob_start();
session_start();
error_reporting(1);

$host = 'localhost';
$dbname = 'xx';
$username = 'xx';
$password = 'xx';
$charset = 'utf8';
//$collate = 'utf8_unicode_ci';
$dsn = "mysql:host=$host;dbname=$dbname;charset=$charset" ;
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_PERSISTENT => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $charset COLLATE $collate"
];

try {
$baglanti = new PDO($dsn, $username, $password, $options);
$baglanti->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
echo 'Bağlantı hatası: ' . $e->getMessage();
exit;
}


$dsn = 'mysql:dbname='.$dbname.';host='.$host.';';
$db_user = $username;
$db_password = $password;
try {
$dbh = new PDO($dsn, $db_user, $db_password,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
} catch (PDOException $e) {
echo 'Bağlantı kurulamadı: ' . $e->getMessage();
}
$limit =9;
include "dilfonksyon.php";
require_once("visitors.php");
?>

Header.php kodları
<?php
session_start();
require_once("vt.php");
if(!isset($_SESSION["musteri"])){
header("location:giris.php");
exit();
}
if (!$_SESSION["dilim"]){
$_SESSION["dilim"]="tr";
}

require("dil/".$_SESSION["dilim"].".php");

$dilicon["tr"]="https://i.hizliresim.com/sJSLhz.png";
$dilicon["en"]="https://i.hizliresim.com/JVQVZ3.png";

$ayarx = $dbh->query("SELECT * FROM general_settings WHERE id = 1 ", PDO::FETCH_ASSOC);
if ($ayarx->rowCount()) {
foreach ($ayarx as $ayarx) {
}
}
?>

<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="parstech"/>
<!-- Page Title -->
<title>Yönetici Paneli - Premium Versiyon v3</title>
<!-- Main CSS -->
<link type="text/css" rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="assets/plugins/font-awesome/css/font-awesome.min.css"/>
<link type="text/css" rel="stylesheet" href="assets/plugins/flag-icon/flag-icon.min.css"/>
<link type="text/css" rel="stylesheet" href="assets/plugins/simple-line-icons/css/simple-line-icons.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/ionicons/css/ionicons.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/toastr/toastr.min.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/chartist/chartist.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/apex-chart/apexcharts.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/jquery-ui/jquery-ui.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/datatables/jquery.dataTables.min.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/datatables/extensions/dataTables.jqueryui.min.css">
<link type="text/css" rel="stylesheet" href="assets/css/app.min.css"/>
<link type="text/css" rel="stylesheet" href="assets/css/style.min.css"/>
<link type="text/css" rel="stylesheet" href="assets/plugins/ionicons/css/ionicons.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/codemirror/codemirror.css">
<!-- Favicon -->
<link rel="icon" href="../img/<?=$ayarx['home_favicon'];?>" type="image/x-icon">
<link type="text/css" rel="stylesheet" href="assets/plugins/dropify/css/dropify.min.css">
<link type="text/css" rel="stylesheet" href="assets/plugins/dropzone/dropzone.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn"t work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="http://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>