As of PHP 4.0.6, the default maximum number of result sets for Frontbase is 128. When your PHP script finishes or is terminated, the result sets are NOT cleaned up as stated above (or at least Frontbase is not aware that the result sets have been destroyed). Therefore, you need to make sure you call fbsql_free_result() after every SELECT, or you will hit the default 128 set limit in a hurry.
Hopefully a future version of PHP will improve the result set cleanup so that the result set limitation doesn't rear its ugly head in the middle of a script.