Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,900 resources
00
Days
14
Hours
08
Mins
50
Secs

help: whmcs autoauth not working..

Status
This thread has been locked.

Wockhardt

Banned
Feedback score
2
Posts
175
Reactions
86
Resources
0
WHMCS AuthAuth is not working (https://docs.whmcs.com/AutoAuth)

My Code: (auth.php)

<?php

$email = "******@galactic.host";
$goto = '../build.php';
/**
* Define WHMCS url and AuthKey from confguration.php
*/
$whmcsurl = "https://www.galactic.host/billing/dologin.php";
$autoauthkey = "*****"; //$autoauthkey from configuration.php

$timestamp = time(); //Get current timestamp
$hash = sha1($email . $timestamp . $autoauthkey); //Generate Hash
$email =
/**
* Generate AutoAuth URL & Redirect
*/
print("Attempting session handshake.. ");
$url = $whmcsurl . "? email=".urlencode($email)."&timestamp=$timestamp&hash=$hash&goto=" . urlencode($goto);
header("Location: $url");
print("Tele: $url ");

exit;


?>

Nothing is happening... The page stays blank, no errors, no redirect. any ideas?
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Jack

Retired Moderator
Supreme
Feedback score
11
Posts
1,209
Reactions
1,462
Resources
0
WHMCS AuthAuth is not working (https://docs.whmcs.com/AutoAuth)

My Code: (auth.php)

<?php

$email = "******@galactic.host";
$goto = '../build.php';
/**
* Define WHMCS url and AuthKey from confguration.php
*/
$whmcsurl = "https://www.galactic.host/billing/dologin.php";
$autoauthkey = "*****"; //$autoauthkey from configuration.php

$timestamp = time(); //Get current timestamp
$hash = sha1($email . $timestamp . $autoauthkey); //Generate Hash
$email =
/**
* Generate AutoAuth URL & Redirect
*/
print("Attempting session handshake.. ");
$url = $whmcsurl . "? email=".urlencode($email)."&timestamp=$timestamp&hash=$hash&goto=" . urlencode($goto);
header("Location: $url");
print("Tele: $url ");

exit;


?>

Nothing is happening... The page stays blank, no errors, no redirect. any ideas?
Do you have php display errors enabled?
 

Wockhardt

Banned
Feedback score
2
Posts
175
Reactions
86
Resources
0
Do you have php display errors enabled?
How do I do that? Im running CPanel btw[DOUBLEPOST=1546278822][/DOUBLEPOST]Enabled errors got this:
Warning: Cannot modify header information - headers already sent by (output started at /home/galactic/public_html/auth.php:3) in /home/galactic/public_html/auth.php on line 24



LINE 24:
header("Location: $url");

 
Last edited:
Banned forever. Reason: Ban Evading (Roman Bruce)

Jack

Retired Moderator
Supreme
Feedback score
11
Posts
1,209
Reactions
1,462
Resources
0
How do I do that? Im running CPanel btw[DOUBLEPOST=1546278822][/DOUBLEPOST]Enabled errors got this:
Warning: Cannot modify header information - headers already sent by (output started at /home/galactic/public_html/auth.php:3) in /home/galactic/public_html/auth.php on line 24



LINE 24:
header("Location: $url");
You can't set HTTP headers if there is already output. More details here: https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php

Easiest fix is just to use a JS redirect:
PHP:
echo '<script>window.location.replace("'.$url.'");</script>';
 
Status
This thread has been locked.
Top