HostStratus Posted November 16, 2013 Share Posted November 16, 2013 I've been digging through threads for days and I still can't find the snippets I'm looking for. My current external login form looks like this: <div id="login-popup"> <span class="login-pop-up-icon"></span><div>Client Login</div> <form action="login.php" method="POST"> <input type="text" placeholder="username" name="username" required> <input type="password" placeholder="password" name="password" required> <input type="submit" value="login"> <div><a href="recover.php">forgot password?</a></div> </form> I want to make this login work just like the standard login, where it logs the user in and directs them to the client area. And if they're already logged in then how can I make it redirect them to the client area? I hate to be spoon fed, but I've spent hours going through other examples of snippets and such and I just can't seem to find what I'm looking for. Thanks in advance guys! 0 Quote Link to comment Share on other sites More sharing options...
HostStratus Posted November 16, 2013 Author Share Posted November 16, 2013 My Check code looks like: <?php require("https:/clients.hoststratus.com/dbconnect.php"); // You may have to change the path here if ($_SESSION['uid']) { echo "whmcs user logged in"; } else { echo "whmcs user not yet login"; } ?> And I get this PHP error: [16-Nov-2013 00:28:54] PHP Warning: require(https:/clients.hoststratus.com/dbconnect.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/stratus/public_html/index.php on line 102 0 Quote Link to comment Share on other sites More sharing options...
mscholten Posted November 16, 2013 Share Posted November 16, 2013 Look for fopen and related functions and stop using require with https:// should fix your issue. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted November 16, 2013 Share Posted November 16, 2013 require("https:/clients.hoststratus.com/dbconnect.php"); You should be using a relative URI for this, and even if allowed to use an absolute external one, "https:/" is improperly formatted. It requires 2 "//". Use this instead: require("/home/stratus/public_html/clients/dbconnect.php"); 0 Quote Link to comment Share on other sites More sharing options...
HostStratus Posted November 16, 2013 Author Share Posted November 16, 2013 They are on different servers, as they are two different sites. I can not link to a relative URL obviously... - - - Updated - - - Look for fopen and related functions and stop using require with https:// should fix your issue. Yeah, checked fopen. allow_url_fopen = ON 0 Quote Link to comment Share on other sites More sharing options...
bear Posted November 16, 2013 Share Posted November 16, 2013 They are on different servers, as they are two different sites. I can not link to a relative URL obviously... Probably should have mentioned that. When an external login is mentioned about WHMCS, that generally means external to WHMCS, not the entire domain/server. Are you trying to use one WHMCS install for two different domains here? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 16, 2013 Share Posted November 16, 2013 apologies if i'm missing something here, but have you tried the Clients Login integration code from the admin area? Utilities -> Integration Code 0 Quote Link to comment Share on other sites More sharing options...
HostStratus Posted November 17, 2013 Author Share Posted November 17, 2013 apologies if i'm missing something here, but have you tried the Clients Login integration code from the admin area? Utilities -> Integration Code Not sure if a mod deleted my reply or what. I have already figured this out brian, that part was fairly simple for me. The issue im having now is getting an output on the external site based on whether the user is logged in on the WHMCS site. - - - Updated - - - Probably should have mentioned that. When an external login is mentioned about WHMCS, that generally means external to WHMCS, not the entire domain/server. Are you trying to use one WHMCS install for two different domains here? one WHMCS install for two different domains...? Umm, no? Sorry, that doesn't make a whole lot of sense. Not sure what exactly you mean. I have one WHMCS install, one WHMCS domain and an external homepage that I want to be able to determine whether the user is logged in or not to the WHMCS site. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted November 17, 2013 Share Posted November 17, 2013 one WHMCS install for two different domains...? Umm, no? Sorry, that doesn't make a whole lot of sense. Not sure what exactly you mean. I have one WHMCS install, one WHMCS domain and an external homepage that I want to be able to determine whether the user is logged in or not to the WHMCS site. I wonder where I got that idea from...oh, right: They are on different servers, as they are two different sites. Good luck puzzling this out. 0 Quote Link to comment Share on other sites More sharing options...
HostStratus Posted November 18, 2013 Author Share Posted November 18, 2013 I wonder where I got that idea from...oh, right: Good luck puzzling this out. Sorry, wasn't trying to be rude, but was just very confused what you meant. I said the two sites were on different servers, but there is not actually 2 different WHMCS installations or anything. Just one external site, and 1 WHMCS installation. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted November 21, 2013 Share Posted November 21, 2013 So u have 2 domains, both domains are on separate servers, u want server A to talk to server B and want the info that is in whmcs that is also on server A to show on server B's domain and show if a user is logged in or not? 0 Quote Link to comment Share on other sites More sharing options...
HostStratus Posted November 21, 2013 Author Share Posted November 21, 2013 So u have 2 domains, both domains are on separate servers, u want server A to talk to server B and want the info that is in whmcs that is also on server A to show on server B's domain and show if a user is logged in or not? Precisely. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.