marke Posted April 10, 2011 Share Posted April 10, 2011 Hi, I need some help figuring this out: I have a hook function written for the AfterModuleCreate hook. It runs fine when I purchase one cPanel hosting account as a customer. Everything works perfectly, WHMCS does its work and cPanel creates the hosting account. No errors anywhere, not in error_log or on the screen. But, if I buy 2 hosting accounts at the same time in the shopping cart then the hook is not called twice - it's only called once. And cPanel only creates one hosting account. The WHMCS order is created, it shows both purchases, but only one cPanel account is created. So I'm thinking that maybe (just guessing) something in my hook function isn't returning properly the firsts time it runs, and so WHMCS never calls the hook function again, because WHMCS never tries to create the second hosting account either. Not sure why. However I know for a fact that the function runs correctly the first time all the way to the end of the function because I put logging code in it to trace it step by step all the way to the end of the function. Now if I simply put a line of code at the top of the hook function to write a log message (for debugging) and then immediately return from the function, then it DOES run twice as it should and cPanel creates 2 hosting accounts as it should. Is this hook supposed to return some value or data in particular? Any idea why it might behave this way? I'm stumped! Any help you can offer is much appreciated. Mark 0 Quote Link to comment Share on other sites More sharing options...
newgenservices Posted April 11, 2011 Share Posted April 11, 2011 Are you running with $display_errors $debug_output enabled in your configuration file? Do you see [sTATUS] => 1 [sTATUSMSG] => Account Creation Ok after cPanel account creation in the debug output? 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.