Configuring PHP

FileRun requires PHP 5.5+. It is recommended to use the newest version of PHP supported by FileRun, for increased performance and security.

FileRun also requires the ionCube PHP extension. Read here how to get that installed.

The following are the optimal PHP settings we recommend for using with your FileRun installation:

expose_php              = Off
error_reporting         = E_ALL & ~E_NOTICE
display_errors          = Off
display_startup_errors  = Off
log_errors              = On
error_log               = "/private/path/php_error.log"
ignore_repeated_errors  = Off

Note: Replace /private/path/php_error.log with a valid path.

Keep in mind that you need to have display_errors set to “Off” on a production server and it's a good idea to frequently check the error logs for possible problems.

If encountering any problems with your FileRun installation, please temporarily set “display_errors” to “On” before providing our technical support access for troubleshooting. Or send us the PHP error log when you are reporting a problem.

open_basedir            = /path-to-filerun:/path-to-user-files/

Note: Replace /path-to-filerun and /path-to-user-files above with actual paths.

This allows PHP access to the FileRun application files (to run the application) and your files, to allow FileRun to manage them. You can add more paths, as needed. Under Windows, separate the directories with a semicolon character (;).

 allow_url_fopen         = On
 allow_url_include       = Off
 variables_order         = "GPCS"
 allow_webdav_methods    = On
 memory_limit            = 128M
 max_execution_time      = 300
 output_buffering        = Off
 output_handler          = ""
 zlib.output_compression = Off
 zlib.output_handler     = ""
 safe_mode               = Off
 register_globals        = Off
 magic_quotes_gpc        = Off
 date.timezone           = "UTC"

Note: Replace UTC with your actual time zone. For a list of possible values, please visit: http://php.net/manual/en/timezones.php

 file_uploads            = On
 upload_tmp_dir          = /path/to/your/temp/folder/
 upload_max_filesize     = 20M
 post_max_size           = 20M

Note: Replace /path/to/your/temp/folder/ with an actual path.

“post_max_size” needs to have at least the same value as “upload_max_filesize”. If you go with larger values than 20M keep in mind that your server might have other limitations in place, which might prevent FileRun from uploading file in larger chunks. If having troubles uploading larger files, always set the two settings lower not higher, as low as 2M. If you are sure that your server can receive larger pieces of files, than increasing these two values will allow for a faster throughput.

 enable_dl               = Off
 disable_functions       = ""
 disable_classes         = ""

Disabling functions such as “sys” and “exec” is a common practice but note that it does not necessary make your PHP safer and it disables any FileRun feature which requires third-party programs (ImageMagick, FFmpeg, Apache Tika, etc.)

 session.save_handler     = files
 session.use_cookies      = 1
 session.use_only_cookies = 1
 session.auto_start       = 0
 session.cookie_lifetime  = 0
 session.cookie_httponly  = 1

It is a good practice to change “session.name” to something else than the PHP default.

The following are the extensions needed by FileRun. For performance, it's recommended that you disable anything else.

  • php_curl
  • php_mbstring
  • php_openssl
  • php_pdo_mysql
  • php_sockets
  • php_gd2
  • ionCube

For installing ionCube, see this page.

The following extensions are optional, but good to have:

  • php_fileinfo
  • php_exif
  • OPcache

Newer cURL versions no longer include a SSL certificate bundle by default.

If your FileRun installation fails to connect to other servers because of SSL problems, you can fix it by downloading this file: https://curl.haxx.se/ca/cacert.pem

and configuring it inside “php.ini” like this:

[CURL]
curl.cainfo = "/path/to/cacert.pem"

Note: Replace /path/to/cacert.pem with the actual path on your server.

fastcgi.impersonate = 0

To avoid troubles installing FileRun updates, make sure the above is set in your PHP configuration.

Besides the settings above, for everything else we recommend to leave the default PHP settings.