PHP: Difference between revisions
m Add note about proc_open(), exec(), popen(), etc., being disabled on Morty, Tommy, and Johnny servers |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
== PHP Versions Supported == | == PHP Versions Supported == | ||
== | == Morty server == | ||
* PHP 5.6 | * PHP 5.6 | ||
* PHP 7.0 | * PHP 7.0 | ||
Line 13: | Line 14: | ||
* PHP 8.2 | * PHP 8.2 | ||
* PHP 8.3 | * PHP 8.3 | ||
* PHP 8.4 | |||
== Tommy server == | == Tommy server == | ||
* PHP 5.6 | * PHP 5.6 | ||
* PHP 7.0 | * PHP 7.0 | ||
Line 22: | Line 25: | ||
* PHP 8.2 | * PHP 8.2 | ||
* PHP 8.3 | * PHP 8.3 | ||
== Johnny server == | |||
* PHP 5.6 | |||
* PHP 7.0 | |||
* PHP 7.4 | |||
* PHP 8.0 | |||
* PHP 8.1 | |||
* PHP 8.2 | |||
* PHP 8.3 | |||
== Lily server == | |||
* 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. | |||
== 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 == | == Learning PHP == | ||
'<?php' is the opening braces and '?>' is the closing braces for PHP. | |||
Here is a sample hello world file. | Here is a sample hello world file. | ||
Line 43: | Line 73: | ||
'''Login > Plesk > [domain] > Dashboard tab > Dev Tools > PHP button > select PHP version from the dropdown menu''' | '''Login > Plesk > [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: | 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 == | == PHP Version Changes Take Up To 2 Hours == | ||
PHP version changes take '''up to 2 hours''' to go into effect as they require an Apache restart. | {{Info|PHP version changes take '''up to 2 hours''' to go into effect as they require an Apache restart.}} |
Revision as of 21:04, 23 March 2025
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
Morty server
- PHP 5.6
- PHP 7.0
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
Tommy server
- PHP 5.6
- PHP 7.0
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
Johnny server
- PHP 5.6
- PHP 7.0
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
Lily server
- 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 have 'exec()' enabled.
Using proc_open(), exec(), popen(), etc.
These functions are disabled on our shared hosting servers (Morty, Tommy, and Johnny) for security reasons. If you need to run proc_open(), exec(), popen(), etc., you will need a 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.
<?php echo "Hello World!"; ?>
A good tutorial can be found here: https://blog.udemy.com/php-tutorial.
Change PHP Version
Follow the navigation steps below to change your PHP version inside Plesk:
Login > Plesk > [domain] > Dashboard tab > Dev Tools > PHP button > select PHP version from the dropdown menu
After the PHP version is changed, you will see a confirmation message that contains the timeframe for the change to take effect: