gotcha, so it works correctly most of the time, but not correctly when accessing via PHP.
When using the PHP application and DBBUser the trigger fails to even run and the application aborts and a trigger error is logged to the SQL Server logs:
Logon failed for login 'DBBUser' due to trigger execution
PHP my be setting different ANSI Settings/ variables than you would normally have, from say, and SSMS connection.
definitely look at the SQL logs; if you find the failed login for PHP, you will find the real, exact error that occurred inside the trigger, and can diagnose from there a lot better.
my first guess is the SET options like you see here:
Lowell