3.7. Configuring PHP

Make sure you have installed pgsql and mbstring modules.

PHP is used in two ways:

  1. Serving Web pages. In this case, PHP is usually used as module and its configuration is in virtual host configuration, as shown later in the document. If you prefer to configure php.ini, the following directives are required by GForge:

    register_globals = On
    magic_quotes_gpc = On
    file_uploads = On
    include_path=".:/var/www/gforge:/var/www/gforge/www/include:/etc/gforge"
    
  2. Cron jobs and some scripts require PHP Command-Line Interface (CLI). Scripts are usually invoked with command like this:

    $ php4 -f cronjobs/mail/mailing_lists_create.php
    

    Note

    The -f is optional when using PHP CLI but it's required when PHP CGI executable is used.

    You must set include_path in PHP CLI php.ini, like already shown above. Increase memory_limit configuration parameter to at least 32M. To find where php.ini is located, use the following command:

    $ php4 -i | fgrep php.ini