Http Error 500

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

Can you share your code?

4 Likes

@Qwaxze

Do not keep these files on the server (files with such extensions can be downloaded)
or at least disable directory listing with .htaccess

1

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

so now you want me to delete those files?

Yes, I would strongly recommend you remove sensitive files from the server.

5 Likes

It doesn’t matter to me :slight_smile:
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

Is it enough if I just share the line with the error or should I share the whole code?

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

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
<?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

image

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

7 Likes

missing also ; at the end of that line

4 Likes

well now i did what you said but no matter what i do it says the private key is wrong

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!

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

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

Username (e.g. epiz_XXX) or Website URL

epiz_33450437

Error Message

ERR_TOO_MANY_REDIRECTS

Other Information

Please provide your domain name

3 Likes

Http://qwaxcheck.rf.gd/login.php/

Please show .htaccess contents.

If it is http://qwaxcheck.rf.gd/login.php, you will see 500 error instead

image

Domain is working fine though

4 Likes