bluetreehost Posted July 19, 2011 Share Posted July 19, 2011 I am doing an integration with WHMCS/Wordpress. Pretty simple, just presenting a login form if not logged in, and a "Hello there" message if they are logged in. I have the following code (per this article): <?php define("CLIENTAREA",true); require("support/dbconnect.php"); require("support/includes/functions.php"); require("support/includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="mypage.php">My Page</a>'; initialiseClientArea($pagetitle,'',$breadcrumbnav); if ($_SESSION['uid']) { $result = mysql_query("SELECT firstname FROM tblclients WHERE id='".$_SESSION['uid']."' LIMIT 1;"); while($row = mysql_fetch_array($result)) echo "<p id='login'>".$_LANG['welcomeback'].', '.$row['firstname'].' | <a href="/support/clientarea.php"><strong>'.$_LANG['clientareanavdetails'].'</strong></a> | <a href="/support/logout.php"><strong>'.$_LANG['logouttitle'].'</strong></a></p>'; } else{ ?> <form action="/support/dologin.php"> <div class="field"> <label>Username </label> <input name="username" type="text" /> </div> <div class="field"> <label>Password </label> <input name="password" type="password" /> </div> <input name="login" type="submit" class="button" value="" /> </form> <?php } ?> It works great when calling from an individual PHP file. Once I integrate it into Wordpress using an include function on the very same PHP file, I get: Down for MaintenanceAn upgrade is currently in progress... Please come back soon... The FAQ indicates that this is a mismatched version information, but in my case it most definitely is not. Does Wordpress redefine the version somewhere? How can I fix this error? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted July 19, 2011 Share Posted July 19, 2011 I would say that you are losing the whmcs DB connection when included into your wordpress. 0 Quote Link to comment Share on other sites More sharing options...
bluetreehost Posted July 19, 2011 Author Share Posted July 19, 2011 Thanks for your response. Even if I include just the following code: define("CLIENTAREA",true); require("support/dbconnect.php"); It still triggers the "Down for maintenance" error message. I'm thinking there must be some type of defined variable regarding the version that may be redefined by Wordpress, but since I can't see the dbconnect code (it is ioncube encoded) I can't be sure. I tried adding: define("VERSION","4.5.2"); just to see if it would work but no go. Any other ideas? 0 Quote Link to comment Share on other sites More sharing options...
joe@x5creative.com Posted July 21, 2011 Share Posted July 21, 2011 I had the same problem while integrating a wordpress site. I cant recall the exact solution, but it had something to do with the includes. My guess is there is a variable conflict of some sort where WHMCS and WP are both naming their vars the same. Sorry I couldnt be much more help than that. 0 Quote Link to comment Share on other sites More sharing options...
bluetreehost Posted July 21, 2011 Author Share Posted July 21, 2011 Thanks, that is my guess as well. Since noone seems to know, I'll open a support ticket to see if I can figure it out. Thanks again for your response. 0 Quote Link to comment Share on other sites More sharing options...
dannyl Posted August 31, 2011 Share Posted August 31, 2011 Hi, is already known a solution? I have almost the same problem but not with Wordpress but with Joomla. I would appreciate if bluetreehost the solution would post here. 0 Quote Link to comment Share on other sites More sharing options...
bluetreehost Posted August 31, 2011 Author Share Posted August 31, 2011 I just included a form that redirects to the WHMCS install. It works, but does not change text on the Wordpress install when they are logged in. I just opened a ticket with the support team about this, will let you know the result. 0 Quote Link to comment Share on other sites More sharing options...
HH-Emil Posted October 29, 2011 Share Posted October 29, 2011 Hello! I have the exact same problem and I am wondering if there is any solution? Did WHMCS answer? Thanks in advance 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.