eksoverzero / whmcs-freeradius

FreeRADIUS server module for WHMCS
111 stars 79 forks source link

Line 42 of cron.php has an redundant 'die' command causing the CRON to fail #1

Closed eugenefvdm closed 11 years ago

eugenefvdm commented 11 years ago

Seems Mysql error checking was possibly omitted so this line fails.

die( "Could not connect to WHMCS database: " . mysql_error() . "\n" );

The workaround is to simply comment out or remove the line above.

eksoverzero commented 11 years ago

What was the fail error that you got on this?

eugenefvdm commented 11 years ago

To clarify, the die statement has no IF THEN block so using the code as as simply does not work:

//Connect to the radius database
$mysql = mysql_connect($freeradius_db_host,$freeradius_db_username,$freeradius_db_password);
$conn = mysql_select_db($freeradius_db_database);
die( "Could not connect to WHMCS database: " . mysql_error() . "\n" );
//end

Remedy is to remove the 'die' command or implement error checking.