Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by Executable

  1. Hello, I'm trying to connect with my mobile device with the correct credentials and I get When I try with the same credentials on desktop I'm able to login to my account. I'm using version 7.7.1 of WHMCS. My website is under SSL. PHP : PHP7.1.29
  2. Executable

    Unable to login with mobile device

    Well I tried on my mobile phone and also tried on desktop browser (using the responsive in the console) and still the same issue. The part I don't really understand, is that if I try to login using an admin account to login into the clientarea it's working, I can connect throught mobile interface. Hard to tell what's happening. To be sure I used the correct credentials I saved them into the browser when I logged in the first time. So I'm sure it's not a typo error
  3. I would to know if it's possible to check user session into a custom page with php ? The custom page is situated on the same server and is in the whmcs folder. I need it to secure the page. Thank you for any reply
  4. On every page of my website I have this following error in my console. I don't what is the root of the problem
  5. Executable

    How to validate user session on custom page ?

    Thanks for the answer, I managed to use it. I would like to know what does the line $ca->initPage(); And my final page looks like : use WHMCS\ClientArea; use WHMCS\Database\Capsule; require 'init.php'; $ca = new ClientArea(); //$ca->initPage(); // What does this line do ? if(isset($_POST['email']) and isset($_POST['password']) and $ca->isLoggedIn()){ $conn = new mysqli("HOST", "USER", "PASSWORD", "DATABASE"); if($stmt = $conn->prepare("SELECT `id` FROM `tblclients` WHERE `email` = ? AND `password` = ?")) { $stmt->bind_param("ss", $_POST['email'], $_POST['password']); $stmt->execute(); $result = $stmt->get_result(); while($row = $result->fetch_assoc()) { $id_user = $row['id']; } $stmt->close(); } $conn->close(); }else{ header("Location: ../../../index.php"); } if(isset($id_user) and !empty($id_user) and isset($_POST['service_id']) and $ca->isLoggedIn()){ //Logged in }else{ //Not logged }
  6. Executable

    How to validate user session on custom page ?

    Thank you for the answer. I found a workaround with the following code : if(isset($_POST['email']) and isset($_POST['password'])){ $conn = new mysqli("HOST", "USER", "PASS", "DATABASE"); if($stmt = $conn->prepare("SELECT `id` FROM `tblclients` WHERE `email` = ? AND `password` = ?")) { $stmt->bind_param("ss", $_POST['email'], $_POST['password']); $stmt->execute(); $result = $stmt->get_result(); while($row = $result->fetch_assoc()) { $id_user = $row['id']; } $stmt->close(); } $conn->close(); } if(isset($id_user) and !empty($id_user)){ //LOGGED IN }else{ //WRONG CREDENTIALS }
  7. Executable

    cron need attention

    I enable the error as you said, but I don't know where to watch for debugging
  8. Executable

    cron need attention

    WHMCS show me an error with cron. Here is the fllowing error : The permission I used for the folder cron Should I use root instead of nginx ? My crontab line which execute */5 * * * * /usr/bin/php -q /usr/share/nginx/html/crons/cron.php
  9. Executable

    cron need attention

    But if I run it with -v I get a success
  10. Executable

    cron need attention

    I have the following error if I run the command
  11. Here is a piece of response I get if I don't use the whmcs function : And if I use the whmcs function I get As you can see, the complementary key got some new value. To compare the seal, I have the original Seal in $_POST['Seal'] To recreate the Seal I build it as follow : $seal = hash('sha256', utf8_encode($Data).$secretKey); So the data is altered then my seal to. How can I fix it ?
  12. I created a custom a custom gateway module for my needs. I made all the verification (seal, response code,...), if I make a simulation everything is working. Now I need the whmcs function addInvoicePayment to accept the invoice. Unfortunately, when I add the following code to get the function, my data are altered so my seal is always corrupted. <?php use WHMCS\Database\Capsule; use WHMCS\Input\Sanitize; require("../../../init.php"); $whmcs->load_function('gateway'); $whmcs->load_function('invoice'); $GATEWAY = getGatewayVariables("customgateway"); if (!$GATEWAY["type"]) die("Module Not Activated"); I don't know what is happening.

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated