Lab Currently Closed Closed All Day on Monday (Presidents' Day) more »

PHP

death, the OCF webserver, currently runs PHP 7.0 with the following non-standard packages installed:

  • APCu (opcode caching)
  • BC Math (arbitrary precision math)
  • Bzip2 (compression library)
  • cURL (networking library)
  • DBA (database connector)
  • GD (graphics library)
  • MB String (string encoding)
  • Mcrypt (cryptography library)
  • MySQL (database connector)
  • SQLite (database connector)
  • SOAP (messaging protocol library)
  • XML (markup parsing library)
  • ZIP (compression library)

For a full list of available modules, run phpinfo() from a PHP script. Plase contact us if you are missing a module that you need installed to get your application running.

Custom PHP settings

If the default PHP settings are problematic for your site (for example, if you require larger than normal file uploads), you can customize the PHP settings used by creating a .user.ini file inside your web root.

In order to maintain compatibility with the OCF's PHP settings, we highly recommend not copying an entire php.ini* or .user.ini file from the web or from another server. Instead, we advise you to create an empty .user.ini and add only the settings you wish to change.

Note that .user.ini filename should be used, as our webserver will not look for (per-user) php.ini files.

Example .user.ini file

The following file, located at ~/public_html/.user.ini, is an example of a good .user.ini file.

; raise max upload and POST sizes
upload_max_filesize = 32M
post_max_size = 32M

; raise maximum number of input variables
max_input_vars = 20000