PHP, also known as PHP: Hypertext Preprocessor, is an open-source scripting language and interpreter. It is used primarily on Linux Web servers to create interactive and dynamic Web pages.
PHP is run as a CGI binary. You may be familiar with PHP as an Apache module. We do not, however, run PHP as an Apache module on our shared servers. Each PHP-enabled domain has its own separate PHP environment that you can control.
When PHP script is embedded within a Web page, the Web server calls PHP to interpret and perform the operations specified in the PHP script. Web pages with embedded PHP script can use the file extensions .php.
You can upload your .php files to any directory in your Web directory other than the cgi-bin directory. PHP files uploaded to and called from the cgi-bin directory will produce an internal server error. Note, however, that the PHP binary file itself (not the PHP files you create) must remain in the cgi-bin. If you are having problems with PHP:
- Check that you have activated PHP. Even if you have selected a hosting plan that supports PHP, you must still activate PHP in SiteControl.
- Check if PHP files are being called from the cgi-bin directory. If .php files have been uploaded to the cgi-bin directory, PHP may not operate properly. Calling a .php file from the cgi-bin directory will produce the error "500-Internal Server Error."
To activate PHP:
- Sign in to SiteControl.
- Go to Manage Services tab.
- Go to Website section.
- Scroll down, find and click the PHP link. You can also click PHP in the left navigation panel in SiteControl.
- Select the proper domain name from the Currently Managing drop-down menu.
- On the PHP Overview page, click Activate PHP.
- You will see a PHP Activation Request Received message. Once PHP has been activated, you can click Back to Overview to go to PHP Overview.
- On the PHP Overview page you can review the status and manage the PHP.
To view the current PHP version and related PHP information:
- Connect to your web hosting via FTP.
- Navigate to: web (for Linux) and www (for Windows) directory.
- Upload or create phpinfo.php file. (For your convenience a phpinfo.php file is attached to this article)
If you are creating the file, in phpinfo.php file enter the following php code:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?> - Once the file is created/uploaded, in the address bar of your browser enter www.example.com/phpinfo.php.