Qwaxze
January 26, 2023, 3:00pm
1
Username (e.g. epiz_XXX) or Website URL
epiz_33450437
Error Message
Parse error: syntax error, unexpected ‘’ (T_ENCAPSED_AND_WHITESPACE), expecting ‘-’ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home/vol8_6/epizy.com/epiz_33450437/htdocs/server/kontrol.php on line 23
Oxy
January 26, 2023, 3:55pm
3
@Qwaxze
Do not keep these files on the server (files with such extensions can be downloaded)
or at least disable directory listing with .htaccess
I removed your screenshot so no one sees the address until you secure those files
(staff can see the address)
You probably mixed up a few quotes
or entered the wrong data type
check your code with some PHP code validator
or compare with the original (if you found the code online)
6 Likes
Qwaxze
January 26, 2023, 5:43pm
5
so now you want me to delete those files?
Yes, I would strongly recommend you remove sensitive files from the server.
5 Likes
Oxy
January 26, 2023, 5:51pm
7
It doesn’t matter to me
I suggested that because I think you might care about your web security or other users of your site.
If you want everyone to see it then don’t blame the hosting if you get hacked or similar.
Also backup files are not allowed (TOS )
And give us the code that gives you the error (copy and paste here on the forum)
of course, hide some sensitive data if it contains.
2 Likes
Qwaxze
January 26, 2023, 5:56pm
8
Is it enough if I just share the line with the error or should I share the whole code?
Oxy
January 26, 2023, 5:58pm
9
it is not
because the trigger for that error can be a few lines above or below
but try to somewhat summarize the code around that line and send it here
if the code is huge
if it is less than 100 lines feel free to paste it here
Do you see that error only on that file or not?
I noticed that you have E500 on other files as well,
but I don’t know if they are somehow related to that one php file or not.
5 Likes
Qwaxze
January 26, 2023, 6:09pm
10
I did not have the opportunity to try other pages because I encountered various errors before this, I know that only this page is wrong at the moment.
2 Likes
Qwaxze
January 26, 2023, 6:12pm
11
<?php
require('baglan.php');
include('../admin/func/gen_func.php');
date_default_timezone_set('Europe/Istanbul');
error_reporting(0);
ini_set('display_errors', 0);
if (isset($_POST['g-recaptcha-response'])) {
$secretkey = "qwax_check";
$ip = $_SERVER['REMOTE_ADDR'];
$response = $_POST['g-recaptcha-response'];
$url = "https://www.google.com/recaptcha/api/siteverify?secret=$secretkey&response=$response&remoteip=$ip";
$fire = file_get_contents($url);
$data = json_decode($fire, true);
$wizard = true;
if ($wizard == true) {
if (isset($_POST['loginForm'])) {
$k_key = htmlspecialchars($_POST['k_key']);
$remember = null;
$loginStatus = "f
if (isset($_POST[rememberMe])) {
$remember = htmlspecialchars($_POST['rememberMe']);
}
if (!empty($remember)) {
$_SESSION['remember'] = 'ok';
}
$sql = "SELECT * FROM `sh_kullanici` WHERE `k_key`=?";
$res = $conn->prepare($sql);
$res->bind_param("s", $k_key);
$res->execute();
$sorgula = $res->get_result();
if ($res->errno > 0) {
header("Location: http://***/login.php/error");
die();
}
$getir = mysqli_fetch_assoc($sorgula);
$verisay = mysqli_num_rows($sorgula);
if ($verisay > 0) {
if ($getir['k_rol'] == '1' or $getir['k_rol'] == '0' or $getir['k_rol'] == '2') {
$useragent = htmlspecialchars($_SERVER["HTTP_USER_AGENT"]);
$k_verified = $getir["k_verified"];
if ($k_verified == "false") {
header("Location: http://***/login.php/banned");
exit;
} else if ($k_verified == "true") {
$sql = "UPDATE `sh_kullanici` SET `k_lastlogin`=? WHERE `k_key`=?";
$res = $conn->prepare($sql);
$res->bind_param("ss", $useragent, $k_key);
$res->execute();
if ($res->errno > 0) {
$loginStatus = "false";
} else {
$loginStatus = "true";
}
if ($loginStatus == "false") {
header("Location: http://***/login.php/error");
exit;
} else if ($loginStatus == "true") {
$_SESSION['id'] = $getir['id'];
$_SESSION['k_rol'] = $getir['k_rol'];
$_SESSION['k_adi'] = $getir['k_adi'];
$_SESSION['k_lastlogin'] = $useragent;
$real_ip = getip();
$browser = getrealbrowser();
$os = getrealos();
$id = $getir['id'];
$query = "UPDATE `sh_kullanici` SET k_browser=?, k_os=?, k_log=? WHERE id=?";
$res = $conn->prepare($query);
$res->bind_param("ssss", $browser, $os, $real_ip, $id);
$res->execute();
if ($res->errno < 1) {
header('location: http://***/panel');
exit;
} else {
header("location: http://***/login.php/error");
exit;
}
} else {
header("Location: http://***/login.php/error");
exit;
}
} else {
header("Location: http://***/login.php/error");
exit;
2 Likes
Oxy
January 26, 2023, 6:14pm
12
this is not how a variable should be declared
if it is a string then close the quotes
if it is some other form of data then give the correct format
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
7 Likes
Oxy
January 26, 2023, 6:24pm
13
missing also ;
at the end of that line
4 Likes
Qwaxze
January 26, 2023, 6:34pm
14
well now i did what you said but no matter what i do it says the private key is wrong
Oxy
January 26, 2023, 6:38pm
15
You can’t fix code in such a banal way unless you understand what it does and make it the way it should be.
You can’t just close the quotes or slap some random value for the variable!
Qwaxze:
private key
Did Google tell you that? or server?
it is best for you to check your entire code and that it corresponds to what is required by Google
and of course, that you have the correct syntax in code.
Use some IDE for PHP programming and so on
or adequately copy the code from a tutorial or where you already get that code from.
5 Likes
Qwaxze
January 26, 2023, 8:09pm
16
The error that the site owner should see: Invalid site key
Please make sure you copied the correct keys into the correct location from your Google ReCAPCHA dashboard to the code on your website.
5 Likes
Please provide your domain name
3 Likes
Qwaxze
January 27, 2023, 1:33pm
21
KangJL
January 27, 2023, 2:00pm
22
Please show .htaccess contents.
If it is http://qwaxcheck.rf.gd/login.php , you will see 500 error instead
When trying to access your website, you may see a page which returns the status code “500”. In Google Chrome, you’ll see a page with the error code HTTP ERROR 500.
There are typically two reasons which can cause this error:
The PHP code has crashed.
The .htaccess file contains invalid rules.
Here are some things you can try to debug and fix this.
Fixing crashing PHP code
A HTTP ERROR 500 simply tells you that the PHP code has crashed, but gives no information as to why it has crashed.
Gett…
Domain is working fine though
4 Likes