Scripts ending in
.php will be executed with
Changing PHP options
Many PHP configurable options can be set by setting their values in a
.user.ini file located in the directory where you want things changed. From
the PHP Manual's list of php.ini
directives, you can change any listed
where the "Changeable" column says either "PHP_INI_PERDIR" or "PHP_INI_ALL".
For example, your
.user.ini might contain:
upload_max_filesize = “30M”
Choosing a version of PHP
You can choose among multiple versions of PHP:
|PHP version||Command-line path||Sunset Date|
|7.4||/opt/remi/php74/root/usr/bin/php||November 28, 2022|
|8.0 (default)||/opt/remi/php80/root/usr/bin/php||November 26, 2023|
|8.1||/opt/remi/php81/root/usr/bin/php||November 25, 2024|
The default version of PHP was changed from 7.4 to 8.0 on January 13, 2022. As a "dot zero" release, this could introduce breaking changes to sites not specifically configured for PHP 7.4.
PHP 7.3 was removed on December 20, 2021. Sites configured for PHP 7.3 began using the default release at that time.
If you need to switch PHP versions, you can do so by creating or editing your
.silk.ini file (for example
~/www-root/.silk.ini) and adding the
version to the
[php] version = 8.1
Valid version choices are
default, any of the versions listed in the table
newest (which provides the newest available on the system).
Your PHP processes should restart with any version changes within a few
minutes. If you would like changes to take effect immediately, type
pkill -u <myusername> php-cgi.
PHP versions from the command-line and scheduled tasks
Since multiple version of PHP are available, make sure you call the intended
version. The version of PHP you call by default from the command-line should
be the version specified in your
~/www-root/.silk.ini file. To call another
version, or to call the correct one from a scheduled task, use its full path,
listed in the table above.
Upgrading from PHP 7.3
PEAR is no longer included with PHP. Add-on libraries should instead be configured using Composer.
A complete list of changes can be found in the PHP documentation at Migrating from PHP 7.3.x to PHP 7.4.x. In particular, note the list of backward incompatible changes.
Upgrading from PHP 7.4
As a major (x.0) release, PHP 8.0 introduces a number of new features while removing previously deprecated features and fixing existing undesirable behavior. Migrating to PHP 8.0 might require more testing for existing code than minor (x.y) releases.
A complete list of changes can be found in the PHP documentation at Migrating from PHP 7.4.x to PHP 8.0.x. In particular, note the list of backward incompatible changes.
Upgrading from PHP 8.0
A complete list of changes can be found in the PHP documentation at Migrating from PHP 8.0.x to PHP 8.1.x. In particular, note the list of backward incompatible changes.
Composer is a popular library dependency manager for PHP. Once you declare what packages your project needs, Composer can install them and keep them up to date. You can see what packages are available at Packagist.
A recent version of
composer is available in your