erwin123 Posted October 26, 2015 Share Posted October 26, 2015 A few years ago I had somebody integrate a 'Add Hosting' button to the client area to be shown next to the clients domainregistrations. After the update this button stopped working. This is the phpcode: define("CLIENTAREA",true); require("dbconnect.php"); $domainparts = explode(".",$domainname,2); $sld = $domainparts[0]; $tld = $domainparts[1]; $gotourl = "cart.php?a=add&pid=1&sld=".$sld."&tld=".$tld."&domainoption=owndomain"; header("Location: $gotourl"); exit; 1. Can anyone say whats wrong with it? 2. Its a mystery to me how customers can upgrade their domainregistration to hosting in a simple way. I disabled the option to buy only hosting because I want our customers to register their domain with us to avoid fraude. Maybe that has something to do with it? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 26, 2015 Share Posted October 26, 2015 1. Can anyone say whats wrong with it? http://docs.whmcs.com/Version_6.0_Release_Notes#Removal_of_Dbconnect.php Removal of Dbconnect.php 6.0 sees the removal of the dbconnect.php file from the root WHMCS directory. This file has been deprecated since WHMCS Version 5.2 and has remained only for backwards compatibility with older modules. As of 6.0 however, any scripts which still rely on including the dbconnect.php file to function will need to be updated to instead include the init.php file. When including the init.php file, it is not necessary to include any other WHMCS files. For reference, the most up-to-date code sample for creating your own custom client area pages which works in WHMCS 5.2.0 and later is available @ http://docs.whmcs.com/Creating_Pages 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 26, 2015 Share Posted October 26, 2015 replace this: require("dbconnect.php"); with: require("init.php"); dbconnect.php is not exist anymore in WHMCS v6 0 Quote Link to comment Share on other sites More sharing options...
erwin123 Posted October 26, 2015 Author Share Posted October 26, 2015 Great thanks, it works. However I still wonder how you would update a domain to hosting without the custom button. Do you have to create an 'hosting option' to the domains? A standard button 'add hosting' next to the registered domains seems so logical to me...? 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.