paperweight Posted April 28, 2013 Share Posted April 28, 2013 I just upgraded from 5.1.3 to 5.2.4. Most things seem fine but I have a problem with the init.php. In the release notes it says: The dbconnect.php file has been removed as of WHMCS V5.2 and so any custom files will require updating to include "init.php" and only "init.php", the current separate "functions.php" include will be handled automatically However, when I switch the code my dbconnect.php for the init.php, I get an error like this: Fatal error: Cannot redeclare getvalidlanguages() in /var/www/whmcslocal/data/www/whmcslocal.com/init.php on line 25 Here is my code before to show network status: {php} include("support/dbconnect.php"); include("support/includes/functions.php"); $query = "SELECT * FROM tblnetworkissues WHERE status='In Progress' ORDER BY lastupdate DESC LIMIT 0,3"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $id = $data["id"]; $lastupdate = $data["lastupdate"]; $title = $data["title"]; $description = $data["description"]; $date = fromMySQLDate($date); echo '<div class="alert alert-error"><p><strong>Network Status: '.$lastupdate.'</strong>: '.$title.' <a href="serverstatus.php?view=open">More...</a></p></div>'; } {/php} And here is the change I made to remove the dbconnect and the functions.php: {php} include("init.php"); $query = "SELECT * FROM tblnetworkissues WHERE status='In Progress' ORDER BY lastupdate DESC LIMIT 0,3"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $id = $data["id"]; $lastupdate = $data["lastupdate"]; $title = $data["title"]; $description = $data["description"]; $date = fromMySQLDate($date); echo '<div class="alert alert-error"><p><strong>Network Status: '.$lastupdate.'</strong>: '.$title.' <a href="serverstatus.php?view=open">More...</a></p></div>'; } {/php} Any idea why this is happening? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 28, 2013 Share Posted April 28, 2013 is it not supposed to be support/init.php ? 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted April 28, 2013 Author Share Posted April 28, 2013 Ahhh... stupid me yes that works. Thank you for your eyes -- they are better than mine. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 29, 2013 Share Posted April 29, 2013 It's the little things that will get you every time. 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.