Jump to content

Sharing non-WHMCS validatelogin session on WHMCS pages.


kpedana

Recommended Posts

Hey guys, I have a page "sub.domain.com", that uses the API to validatelogin and start the session. I'm not actually doing any session_start or anything, I'm calling validatelogin, and then on my non-WHMCS pages I'm just using:

 

define("CLIENTAREA", true);

require("/www/domain.com/html/billing/init.php");

use WHMCS\Database\Capsule;

$ca = new WHMCS_ClientArea();

$ca->initPage();

 

And everything seems to work great staying logged in on the non-WHMCS page. What I'm trying to do is when someone visits domain.com/billing it knows there's that session started already, which doesn't seem to be the case. Now, if I do put everything on the same domain it seems to work swimmingly. My php.ini has the cookie_domain as .domain.com so I'm unsure if it's cookie related -vs- something code-wise. Any help would be greatly appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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