What permissions do I need to set for my PHP script files?
To avoid potential problems, you should set your PHP script file permissions to 755 (read, write, and execute permissions for the user, and read and execute permissions for the group and world).Do I need to add a header (shebang) at the top of my PHP script files?
No. You do not need to add a #!/usr/bin/php header (shebang) to your PHP script files.Can I use short tags in my PHP script files?
Yes, we have installed support for short tags with PHP. This means that you can write:What is the path to the PHP executable?
The absolute path to the PHP executable on hosting.com’s servers is /usr/bin/php. The /usr/bin directory is in the default path, so generally you do not need to include the full path when you run PHP scripts from the command line. Just type the following command, replacing filename with the name of your script file:What version of PHP is installed on my account?
Currently, you can use PHP version 5.6, 7.1-7.4, or 8.0-8.4.-
To determine the command-line PHP version currently installed on your account, type the following command at the command prompt:
- To determine the PHP version that the web server uses to process web pages on your site, log in to cPanel, and in the Software section of the home screen, click Select PHP Version. You can also change the PHP version that the web server uses for web site files on this page.
On an unmanaged VPS or dedicated server, you can install any version of PHP that you want.