Using PHP on the users.jyu.fi website


Using PHP

Use of PHP on your own website

You can use RedHat Enterprise Linux 9 and the version of PHP that comes with it (currently 8.2.13 ). PHP is updated whenever RedHat releases a newer version of it. No other updates to PHP are made without very good reasons. No plugins outside the RedHat distribution packages are installed on PHP. PHP is run on top of fast cgi with php-fpm, so no mod_php is used.

 

PHP settings

The more common PHP settings that affect users (set in the /etc/php.ini file) are:

 

short_open_tag = Off

Use the full php tag <?php and ?>. The shorter version <? and ?> is no longer recognized.

 

display_errors = Off

Error messages generated by PHP are not shown to the web browser. The error messages therefore only go to the server's error log, which users cannot view. This is unfortunate for code writers, but absolutely essential for server security.

 

file_uploads = On ja upload_max_filesize = 16M

PHP allows the use of the upload function and has a maximum transfer file size of 16 megabytes.

 

Using ready-made PHP applications

The use of off-the-shelf PHP applications available online (e.g. various discussion forums, learning platforms, document management systems, etc.) is absolutely not allowed. You need to make a request to set up a service to use them.

Problems caused by a PHP version update

The PHP update brings new features that may also cause problems. The major version changes also remove features that are bad for security. If you suspect problems caused by a version change, you should read php's own documentation on migration issues: https://www.php.net/manual/en/appendices.php