ZeroByter / zeropanelv2

Another one of those admin panels for Arma 3 Altis Life
GNU General Public License v3.0
7 stars 3 forks source link

NO MONEY LOCK #23

Closed CrackH34D closed 5 years ago

CrackH34D commented 5 years ago

Hey,

when we added money there is no money log created.

Best Regards.

28727#0: *1674016 FastCGI sent in stderr: "PHP message: PHP Recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/vhosts/liveyourlife.cc/test.liveyourlife.cc/phpscripts/requests/changemoneycash.php on line 13" while reading response header from upstream

CrackH34D commented 5 years ago

`<?php include("../fillin/scripts.php");

if(isset($_POST["uid"]) && isset($_POST["amount"])){
    if(permissions::user_has_permission("editmoneybank")){
        $moneyBefore = players::get_by_id($_POST["uid"])->bankacc;
        players::changeMoneyBank($_POST["uid"], $_POST["amount"]);
        $moneyAfter = players::get_by_id($_POST["uid"])->bankacc;

        $playerIDAlias = essentials::getAlias("playerID");

        $player = players::get_by_id($_POST["uid"]);
        logs::add_log("money", "$1 added {$_POST["amount"]}$ to $player->name. See money logs for more details", 10);
        moneylogs::create($moneyBefore, $_POST["amount"], $moneyAfter, $_POST["uid"], "Bank Account");
        echo "success";
    }else{
        echo "No permission!";
    }
}else{
    echo "Missing inputs!";
}

?>`

`<?php include("../fillin/scripts.php");

if(isset($_POST["uid"]) && isset($_POST["amount"])){
    if(permissions::user_has_permission("editmoneycash")){
        $moneyBefore = players::get_by_id($_POST["uid"])->bankacc;
        players::changeMoneyCash($_POST["uid"], $_POST["amount"]);
        $moneyAfter = players::get_by_id($_POST["uid"])->bankacc;

        $playerIDAlias = essentials::getAlias("playerID");

        $player = players::get_by_id($_POST["uid"]);
        logs::add_log("money", "$1 added {$_POST["amount"]}$ to $player->name. See money logs for more details", 10);
        moneylogs::create($moneyBefore, $_POST["amount"], $moneyAfter, $_POST["uid"], "Cash");
        echo "success";
    }else{
        echo "No permission!";
    }
}else{
    echo "Missing inputs!";
}

?> `

Posible Fix without the PID

ZeroByter commented 5 years ago

Have you changed changemoneycash.php?

ZeroByter commented 5 years ago

Perhaps you may need to go to the settings page in the panel itself and change the PID alias. It's a little hard to describe and I can't tell what the problem is for sure without diagnosing the problem myself. I can come on Teamspeak in the next hour or two and help you there directly?

SalihCanBinboga commented 5 years ago

@ZeroByter php version should be at least how many?

ZeroByter commented 5 years ago

@ZeroByter php version should be at least how many?

Well, should be as high as you can get. Minimum version 5.6.24.

SalihCanBinboga commented 5 years ago

http://prntscr.com/okecg4 does this sound natural?

SalihCanBinboga commented 5 years ago

@ZeroByter

SalihCanBinboga commented 5 years ago

i create xampp php server and put the files working no problem. but http://armaturk.org/adminpanel/ not working

ZeroByter commented 5 years ago

As has been mentioned here: https://github.com/ZeroByter/zeropanelv2/issues/24#issuecomment-510929408, you should not use XAMPP for hosting your panel in a production manner. XAMPP should only be used for closed-off development.

From the screenshot you showed it looks like you placed the panel in some subfolder, you need to access the .htaccess file and append the subfolder to the RewriteBase property.