A “Not Supported” message will show because PHP is not able to run under root using cPanel.
To allow scripts to run firstly install and enable suPHP, then set the PHP Handler to use suPHP and it should allow you to run .php scripts under temp URLs.
Login to cPanel WHM and install suPHP (Choose EasyApache 4 from the menu then choose “customize” – In Apache Modules, search “mod_suphp” and then click ‘Next’ to provision the installation.
Once suPHP has been installed you need to enable the PHP Handler to use it. Access “Software > MultiPHP Manager” in WHM as root. Click on PHP Handlers. Click on ‘Edit’ for the respective PHP version and select suPHP from the dropdown. (Usually set to CGI by default) Click on Apply.
Now, try accessing the php file from the temp URL and it should work.
If you need any further help please contact me with using contact form other way i added in the website.
Thanks 🙂