Using PHP 5 on the CSAIL Web servers

The main CSAIL Web described at WebServerArchitecture run PHP 5.5 as of December 2017. Files with extensions .php and .php5 will be handled by PHP via FastCGI.

.user.ini files

You can customize the PHP configuration your scripts will see by creating a file named .user.ini in the same directory as your PHP scripts, or a higher directory that's within the same web-accessible space. The only valid comment character in this file is the semicolon (;).

Manual entries include .user.ini files and List of php.ini directives

PHP and .htaccess files

.htaccess files are used to customize Apache behavior on a per-directory basis. See HtaccessHints for general background.

  • Do not use the directives php_value and php_flag -- they will trigger 500 Internal Server Error, and "Invalid command 'php_..." will appear in the error log. Instead, use .user.ini files (see above)

PHP 5 and SSL variables

If your script depends on being able to get SSL client information from the environment (e.g., with "SSLOptions +StdEnvVars" in your .htaccess file), the prefix REDIRECT_ is prepended to all of their names when invoking a PHP (but not regular CGI) script. For example, SSL_CLIENT_S_DN_Email is known as REDIRECT_SSL_CLIENT_S_DN_Email in PHP scripts.
Topic revision: 12 Dec 2017, GarrettWollman
 

MIT Computer Science and Artificial Intelligence Laboratory

 

  • About CSAIL
  • Research
  • News + Events
  • Resources
  • People

This site is powered by Foswiki MIT: Massachusetts Institute of Technology