Edit:
......original code ended up working, the issue was the php I was trying to call was outside the public root and it wouldn't execute from the vB template from there (but it would from the main .php). Moved the php into a public directory and it worked.