PHP

From OCF Help

Jump to: navigation, search

PHP is a popular programming language for creating dynamic web sites. The OCF only supports the use of PHP 5 on our web server through CGI scripts. PHP 4 support was discontinued on May 12, 2008.

Contents

Custom PHP Settings

If you want to customize your PHP settings, you will need to use a custom php.ini. You can setup a custom php.ini by copying the OCF's PHP standard configuration file (available at /opt/ocf/etc/php.ini on asteroid.OCF.Berkeley.EDU) to the root of your web directory:

cp /opt/ocf/etc/php.ini ~/public_html/

Place your custom PHP settings in your copy of php.ini.

CGI

There are two ways to run PHP scripts as CGI scripts on the OCF web server:

  • You can treat them as regular CGI scripts, in which case the script name should end with .cgi and the path to the PHP interpreter should be specified at the top of the script.
  • If the file name has a .php extension, the script will be automatically parsed by the PHP interpreter.

mod_php

For security reasons, the OCF does not support the execution of PHP scripts through mod_php.

See also

External links

Personal tools