Spider friendly URLs are only in version 6.5 and higher. If you're having this issue in 6.4, you can try replacing PHP_SELF with SCRIPT_NAME as I noted above and see if it solves it. Backup your file first.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.