REQUEST Fatal error on Panel XCIPTV

AIMAX TV

New member
Joined
Jul 12, 2023
Messages
23
Awards
1
Offline
I need help, im trying to install a panel, but i think that is a problem with my hosting, or maybe the files, idk.
when i try enter to the url of the panel, i got this errors:


Warning: SQLite3::exec(): database disk image is malformed in /home/xxxxxxx/public_html/panel/index.php on line 5

Warning
: SQLite3::query(): Unable to prepare statement: 11, database disk image is malformed in /home/xxxxxxx/public_html/panel/index.php on line 7

Fatal error
: Uncaught Error: Call to a member function fetchArray() on bool in /home/xxxxxxx/public_html/panel/index.php:8 Stack trace: #0 {main} thrown in /home/xxxxxxx/public_html/panel/index.php on line 8

i share the index.php of that lines:
<?php
@session_start();

$db = new SQLite3('./api/.db.db');
$db->exec("CREATE TABLE IF NOT EXISTS users(id INTEGER PRIMARY KEY,username TEXT ,password TEXT)");

$log_check = $db->query("SELECT * FROM users WHERE id='1'");
$roe = $log_check->fetchArray();
$loggedinuser = @$roe['username'];

if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
header("location:"."dns.php");
}

$rows = $db->query("SELECT COUNT(*) as count FROM users");
$row = $rows->fetchArray();
$numRows = $row['count'];
if ($numRows == 0){
$db->exec("INSERT INTO users(id ,username, password) VALUES('1' ,'admin', 'admin')");
$db->close();
}

if (isset($_POST["login"])){
if(!$db){
echo $db->lastErrorMsg();
} else {
}
$sql ='SELECT * from users where username="'.$_POST["username"].'";';
$ret = $db->query($sql);
while($row = $ret->fetchArray() ){
$id=$row['id'];
$username=$row['username'];
$password=$row['password'];
}
if ($id!=""){
if ($password==$_POST["password"]){
session_regenerate_id();
$_SESSION['loggedin'] = TRUE;
$_SESSION['name'] = $_POST['username'];
if ($_POST['username'] == 'admin'){
header('Location: user.php');
}else{
header('Location: dns.php');
}
}else{
header('Location: ./api/index.php');
}
}else{
header('Location: ./api/index.php');
}
$db->close();
}
 

dazbrin

Well-known member
Joined
Nov 16, 2021
Messages
215
Awards
3
Offline
Make sure you have php 7.4 and also ioncube and source guardian extensions enabled
 
Top