Web Hosting Talk







View Full Version : Tint Tool for Webhosts


clevohost
07-29-2004, 10:26 AM
Hello,

Im trying to get an automated web hosting signup script going that is choking somewhere in one file, three quarters to the end of it. I have been back and forth with the author and his last response was pretty much unhelpfull, he is basically giving up because the test code he sent me during our troubleshooting is the same code off the script. The test code works-paypal is paid and the account sets up in WHM however the full script does not work- It does everything but set up the account in WHM.

If I post some code and the few comments from the author would someone look at it and help me please? The proggy is free and it`s main site is here- http://www.teatoast.com/PmWiki.

If we get it going I`m sure that the whole working program (which is small) could be beneficial to some here.

Im mainly after the proggy so I can automatically make cheap .50 accounts set up for people in my tech classes at school.

Thanks,

bri

clevohost
07-29-2004, 12:11 PM
This is the test code he sent me. When the variables were added the account set up just fine in WHM.

<?php
include 'config.php';
include '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$option_selection1 = "XXX.com";
$option_selection2 = "dummy";
$acctpass = "tool";
$acctplan = "XXX_standard";
//
$reply = createacct
($whm_host,$whm_user,$whm_accesshash,$whm_usessl,$option_selection1,$option_selection2,$acctpass,$acctplan);
echo $reply;
exit;
?>

clevohost
07-29-2004, 12:13 PM
This is what is in the script itself:

$reply = createacct ($whm_host,$whm_user,$whm_accesshash,$whm_usessl,$option_selection1,$option_selection2,$acctpass,$acctplan);

clevohost
07-29-2004, 12:15 PM
Can anyone think of why it would manually work on the test script and not on the script package itself?

Hiw would I degug this going line by line, checking the variables that are passed to WHM?

thx,
bbri

clevohost
07-29-2004, 12:20 PM
Sorry double post

TR Seeks
07-29-2004, 12:53 PM
I would guess a variable is empty or inavlid or something.

clevohost
07-29-2004, 01:00 PM
Well all the variables are dropped into the SQL database and the info is passed to paypal and on the final 'welcome' page that is emailed and shown to the new user has all the proper input that should be reflecting in WHM. Where would I look to see if empty variables are being passed??

clevohost
07-29-2004, 01:34 PM
Can anyone tell me how to do this or at least properly write it to check it?

Try stopping the program just before that line and echo or print your
variables to the screen. Check the accuracy of all 7 vars.
Try something like ...
echo $whm_host."<br>"
.$whm_user."<br>"
.$whm_accesshash."<br>"
.$whm_usessl."<br>"
.$option_selection1."<br>"
.$option_selection2."<br>"
.$acctpass."<br>" .$acctplan;
exit;

That way we can see what values WHM is trying to act on.

TR Seeks
07-29-2004, 02:04 PM
Just before

$reply = createacct ($whm_host,$whm_user,$whm_accesshash,$whm_usessl,$option_selection1,$option_selection2,$acctpass,$acctplan);


paste


echo $whm_host."<br>"
.$whm_user."<br>"
.$whm_accesshash."<br>"
.$whm_usessl."<br>"
.$option_selection1."<br>"
.$option_selection2."<br>"
.$acctpass."<br>" .$acctplan;
exit;

clevohost
07-29-2004, 02:14 PM
Thank you very much. Darn thing passed all the variables to the browser. Wonder where this proggy could be choking? :(

clevohost
07-29-2004, 08:26 PM
Here is latest from developer:

Beyond how the TinyTool program works I can't be of much use. At this point
I believe some problem exists with the planname that is passed into the
createacct() funcion.