← PHP View source for PHP You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Users. You can view and copy the source of this page. == PHP == PHP is the most popular scripting language on the Internet for a reason. It's easy to learn and easy to implement, yet is powerful enough to suit almost every task. Unlike some other languages, PHP is not explicitly linked with any programming paradigms, allowing for more flexible development. HelioHost offers the latest versions of PHP on all its hosting accounts. We are unique in that we offer PHP without safe mode, which is the more secure but less functional alternative that you'll find on most free hosts. == PHP Versions Supported == The PHP versions supported on each server are listed below. To see the PHP packages installed for each version, click on the 'phpinfo()' link. To check if a specific package is installed, press <code>Ctrl + F</code> and type in the package name to search the page. == Morty server == {| class="wikitable" |+ style="caption-side:top; |'''Morty server''' |- ! PHP Version !! Packages Installed |- | PHP 5.6 || [https://php56.krydos3.heliohost.org phpinfo()] |- | PHP 7.0 || [https://php70.krydos3.heliohost.org phpinfo()] |- | PHP 7.4 || [https://php74.krydos3.heliohost.org phpinfo()] |- | PHP 8.0 || [https://php80.krydos3.heliohost.org phpinfo()] |- | PHP 8.1 || [https://php81.krydos3.heliohost.org phpinfo()] |- | PHP 8.2 || [https://php82.krydos3.heliohost.org phpinfo()] |- | PHP 8.3 || [https://php83.krydos3.heliohost.org phpinfo()] |- | PHP 8.4 || [https://php84.krydos3.heliohost.org phpinfo()] |} == Tommy server == {| class="wikitable" |+ style="caption-side:top; |'''Tommy server''' |- ! PHP Version !! Packages Installed |- | PHP 5.6 || [https://php56.krydos1.heliohost.org phpinfo()] |- | PHP 7.0 || [https://php70.krydos1.heliohost.org phpinfo()] |- | PHP 7.4 || [https://php74.krydos1.heliohost.org phpinfo()] |- | PHP 8.0 || [https://php80.krydos1.heliohost.org phpinfo()] |- | PHP 8.1 || [https://php81.krydos1.heliohost.org phpinfo()] |- | PHP 8.2 || [https://php82.krydos1.heliohost.org phpinfo()] |- | PHP 8.3 || [https://php83.krydos1.heliohost.org phpinfo()] |- | PHP 8.4 || [https://php84.krydos1.heliohost.org phpinfo()] |} == Johnny server == {| class="wikitable" |+ style="caption-side:top; |'''Johnny server''' |- ! PHP Version !! Packages Installed |- | PHP 5.6 || [https://php56.krydos2.heliohost.org phpinfo()] |- | PHP 7.0 || [https://php70.krydos2.heliohost.org phpinfo()] |- | PHP 7.4 || [https://php74.krydos2.heliohost.org phpinfo()] |- | PHP 8.0 || [https://php80.krydos2.heliohost.org phpinfo()] |- | PHP 8.1 || [https://php81.krydos2.heliohost.org phpinfo()] |- | PHP 8.2 || [https://php82.krydos2.heliohost.org phpinfo()] |- | PHP 8.3 || [https://php83.krydos2.heliohost.org phpinfo()] |- | PHP 8.4 || [https://php84.krydos2.heliohost.org phpinfo()] |} == Lily server == {| class="wikitable" |+ style="caption-side:top; |'''Lily server''' |- ! PHP Version |- | PHP 5.3 |- | PHP 5.4 |- | PHP 5.5 |- | PHP 5.6 |- | PHP 7.0 |- | PHP 7.1 |- | PHP 7.2 |- | PHP 7.3 |- | PHP 7.4 |- | PHP 8.2 |} All versions of PHP supported on [[:Lily|Lily]] have 'exec()' enabled. == PHP Packages Installed == === Inside Plesk === Follow the navigation steps below to view which PHP packages are installed: '''Login > Plesk > Websites & Domains > [domain] > Dashboard tab > Dev Tools > PHP button > click on the ' View the phpinfo() page' link''' To check if a specific package is installed, press <code>Ctrl + F</code> and type in the package name to search the page. [[File:View-phpinfo.png]] === View phpinfo() page === If you don't have a HelioHost account to access information within Plesk, you can view the installed PHP packages for the available PHP versions on our servers by checking [[#PHP_Versions_Supported|the relevant phpinfo() page links here]]. == Using proc_open(), exec(), popen(), etc. == These functions are disabled on our shared hosting servers ([[:Morty|Morty]], [[:Tommy|Tommy]], and [[:Johnny|Johnny]]) for security reasons. If you need to run proc_open(), exec(), popen(), etc., you will need a [https://heliohost.org/vps/ VPS]. We offer a range of VPS plans, and a 10% discount when you pay for 6 months upfront. == Learning PHP == '<?php' is the opening braces and '?>' is the closing braces for PHP. Here is a sample hello world file. <pre> <?php echo "Hello World!"; ?> </pre> A good tutorial can be found here: [https://blog.udemy.com/php-tutorial/ https://blog.udemy.com/php-tutorial]. == Change PHP Version == Follow the navigation steps below to change your PHP version inside Plesk: '''Login > Plesk > Websites & Domains > [domain] > Dashboard tab > Dev Tools > PHP button > select PHP version from the dropdown menu''' [[File:plesk-change-php-version.png]] After the PHP version is changed, you will see a confirmation message that contains the timeframe for the change to take effect: [[File:plesk-php-change-120-min.png]] == PHP Version Changes Take Up To 2 Hours == {{Info|PHP version changes take '''up to 2 hours''' to go into effect as they require an Apache restart.}} Template used on this page: Template:Info (view source) Return to PHP.