Jump to content

WHMCS "Down for Maintenance" Message when integrating into Wordpress


Recommended Posts

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 Maintenance

An 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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

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