I can’t promise anything since I’have never seen IPB database structure nor code, but I can give it a try. Drop me a line at jaime at iteisa dot c0m with the public URI and I’ll have a look at it if you are still interested.
Have you checked if FILENAME (line 85) is writeable by the server? If it is, try switching EXPORT_TO_FILE to false and AUTO_IMPORT_EXPORTED_DATA to true. As usual, please do always a database backup before.
I enhaced the excellent Bruno Torres’ script and made it able to import bbCode, as well as to cleanly import topics marked as closed, sticky and announcements, as well as some other improvements and bugfixing.