ukgaz Posted June 11, 2012 Share Posted June 11, 2012 Hi Everyone, Been playing around with some custom module work lately and getting a bit stumped on a strange error that is emerging and thought I'd ask if anyone else has seen this one occur Fatal error: Cannot redeclare template_ConfigOptions() (previously declared in FILELOCATION: in FILELOCATION on line 16 Any suggestions on what to try out, I first set it to the following where I guess is the issue : function mydb_ConfigOptions() { # Should return an array of the module options for each product - maximum of 24 $configarray = array( "Package Name" => array( "Type" => "text", "Size" => "25", ), ); return $configarray; } and then tried the default and getting the exact same result. 0 Quote Link to comment Share on other sites More sharing options...
apex Posted June 30, 2012 Share Posted June 30, 2012 I have this same problem: Fatal error: Cannot redeclare cabinets_admincustombuttonarray() (previously declared in /home/forked/Sites/portal/modules/servers/cabinets/cabinets.php:6) in /home/forked/Sites/portal/modules/servers/cabinets/cabinets.php on line 11 0 Quote Link to comment Share on other sites More sharing options...
apex Posted June 30, 2012 Share Posted June 30, 2012 It was giving the same error with every function. I found a workaround which is: Place the php code in a separate file (example: code.php) and then in the module use this code: <? php include_once('code.php'); ?> Otherwise there seems to be a bug in whmcs that is loading the module twice. I'm using WHMCS 4.5.2 (an old version). 0 Quote Link to comment Share on other sites More sharing options...
ukgaz Posted July 2, 2012 Author Share Posted July 2, 2012 I managed to figure this one out, you must have MODULENAME_ at the start of every command, simple schoolboy error! Just trying to get SQL to create a user now in an action button but not having much luck 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.