It’s the XYZ snippet plugin and the shortcode is entered onto the web page.
After spending about two days trying to resolve this it appears that the directory (in this case via the global variable – $SOUNDBITEDIRECTORY_) has to be the full path name and not the a relative pathname.
Not sure why it gives a 500 Internal Server Error when saving the WP page, but the code still functions correctly.
The problem, of course, is that I could live with the code working but when you need to update the snippet (or any other snippet on that page), you can no longer save it – so it needed resolving.