I have now got it working. I think the issue was that PHP has put some restrictions on the use of the $GLOBALS variable. I had to rewrite the code so that I was not passing $GLOBALS to a function. For example, something like array_key_exists($key, $GLOBALS) was no longer working to tell whether a variable name existed, and I had to use something like isset($GLOBALS[$key]) instead.
I have now got it working. I think the issue was that PHP has put some restrictions on the use of the
$GLOBALS
variable. I had to rewrite the code so that I was not passing$GLOBALS
to a function. For example, something likearray_key_exists($key, $GLOBALS)
was no longer working to tell whether a variable name existed, and I had to use something likeisset($GLOBALS[$key])
instead.