Posts Tagged ‘PHP5 scripts’
I need to run PHP5 scripts with a .php file extension. How do I do this?
You need to specify the following in a .htaccess file:-
SetEnv DEFAULT_PHP_VERSION 5
This means that any php file ending in .php will be executed as PHP5 rather that PHP4.
This can be set up via Control Panel > Switch PHP Version.
If this file doesn’t exist, you can create it using a normal text editor. It should be created on a per-site basis and uploaded into the folder containing your script (or simply into the public_html folder if you want it to affect site-wide).
Some PHP 4 scripts require short_open_tag to be enabled, this is off by default in php 5.
To enable this in php 5 add the following to your php5.ini file:-
short_open_tag = 1