phpbt worked fine on the old php4.1.2

After an apache and php4.2.1 upgrade, I cannot get it to work.

Login always says "invalid login" and most other pages return with an SQL error, eg,
Query bugs returns:
Database error: Invalid SQL: select p.project_id, project_name from phpbt_project p left join phpbt_project_group pg using(project_id) where active = 1 and (pg.project_id is null or pg.group_id in ()) group by p.project_id, p.project_name order by project_name
MySQL Error: 1064 (You have an error in your SQL syntax near ')) group by p.project_id, p.project_name order by project_name' at line 2)
Session halted.

I'm using the same php.ini file as before.  I've scoured the php pages to see what has changed, but I cannot find anything relevant.

I've reinstalled phpbt in a new database, same.

I've tried reinstalling the latest phpbt, same.

I can access the database fine via mysql command line commands.

I guess it's something wrong with my php setup.  Any comments would be welcome.