Problem
You see the following warning when the system loads a template:
Smarty Error: Smarty does not allow the PHP tag in the following template:
Cause
This warning appears when the system finds legacy Smarty tags inside one of your templates. In versions 9.0 and later, WHMCS does not allow raw PHP inside templates for security reasons.
Solution
To resolve this error, remove all legacy Smarty tags from your template files.
You can use the Smarty Compatibility Report at Reports > Reports to locate files that contain Smarty tags.
Last modified: 2025 December 16