I didn't test any about bmsurvey for PHP5.
It's just a point of answer for you, but I supporse lot of warnings and errors after that.
Good luck,
bmsurvey_init();
function bmsurvey_init(){
global $xoopsDB;
define('TABLE_REALM', $xoopsDB->prefix("bmsurvey_realm"));
define('TABLE_RESPONDENT', $xoopsDB->prefix("bmsurvey_respondent"));
define('TABLE_DESIGNER', $xoopsDB->prefix("bmsurvey_designer"));
define('TABLE_SURVEY', $xoopsDB->prefix("bmsurvey_survey" ));
define('TABLE_QUESTION_TYPE', $xoopsDB->prefix("bmsurvey_question_type" ));
define('TABLE_QUESTION', $xoopsDB->prefix("bmsurvey_question" ));
define('TABLE_QUESTION_CHOICE', $xoopsDB->prefix("bmsurvey_question_choice" ));
define('TABLE_ACCESS', $xoopsDB->prefix("bmsurvey_access" ));
define('TABLE_RESPONSE', $xoopsDB->prefix("bmsurvey_response" ));
define('TABLE_RESPONSE_BOOL', $xoopsDB->prefix("bmsurvey_response_bool" ));
define('TABLE_RESPONSE_SINGLE', $xoopsDB->prefix("bmsurvey_response_single" ));
define('TABLE_RESPONSE_MULTIPLE', $xoopsDB->prefix("bmsurvey_response_multiple" ));
define('TABLE_RESPONSE_RANK', $xoopsDB->prefix("bmsurvey_response_rank" ));
define('TABLE_RESPONSE_TEXT', $xoopsDB->prefix("bmsurvey_response_text" ));
define('TABLE_RESPONSE_OTHER', $xoopsDB->prefix("bmsurvey_response_other" ));
define('TABLE_RESPONSE_DATE', $xoopsDB->prefix("bmsurvey_response_date" ));
define('TABLE_', $xoopsDB->prefix("bmsurvey_" ));
}
TO
global $xoopsDB;
define('TABLE_REALM', $xoopsDB->prefix("bmsurvey_realm"));
define('TABLE_RESPONDENT', $xoopsDB->prefix("bmsurvey_respondent"));
define('TABLE_DESIGNER', $xoopsDB->prefix("bmsurvey_designer"));
define('TABLE_SURVEY', $xoopsDB->prefix("bmsurvey_survey" ));
define('TABLE_QUESTION_TYPE', $xoopsDB->prefix("bmsurvey_question_type" ));
define('TABLE_QUESTION', $xoopsDB->prefix("bmsurvey_question" ));
define('TABLE_QUESTION_CHOICE', $xoopsDB->prefix("bmsurvey_question_choice" ));
define('TABLE_ACCESS', $xoopsDB->prefix("bmsurvey_access" ));
define('TABLE_RESPONSE', $xoopsDB->prefix("bmsurvey_response" ));
define('TABLE_RESPONSE_BOOL', $xoopsDB->prefix("bmsurvey_response_bool" ));
define('TABLE_RESPONSE_SINGLE', $xoopsDB->prefix("bmsurvey_response_single" ));
define('TABLE_RESPONSE_MULTIPLE', $xoopsDB->prefix("bmsurvey_response_multiple" ));
define('TABLE_RESPONSE_RANK', $xoopsDB->prefix("bmsurvey_response_rank" ));
define('TABLE_RESPONSE_TEXT', $xoopsDB->prefix("bmsurvey_response_text" ));
define('TABLE_RESPONSE_OTHER', $xoopsDB->prefix("bmsurvey_response_other" ));
define('TABLE_RESPONSE_DATE', $xoopsDB->prefix("bmsurvey_response_date" ));
define('TABLE_', $xoopsDB->prefix("bmsurvey_" ));