Configure Genero Studio for PHP

Follow this procedure to complete the PHP configuration.

Before you begin

  • You have installed and licensed Genero Report Writer.
  • Install a PHP package, version 5.3 or greater. You can use the non-thread safe package.
    Tip: Make note of this path, as you will need to provide the directory path as part of this configuration.
  • Configure these PHP extensions to load at runtime.
    • PDO: php_pdo_sqlite
    • SQLite3: php_sqlite3
    • Sockets: php_sockets
    Please refer to the PHP documentation for complete instructions on configuring your PHP installation. You may have to create the php.ini file; such instructions will be detailed in the configuration instructions in the PHP documentation.
    Tip: To configure extensions to load at runtime, you provide the extension directory and the list of extensions to load in the php.ini file, as follows:
    extension_dir = "./ext"
    extension=php_pdo_sqlite.dll
    extension=php_sockets.dll
    extension=php_sqlite3.dll
  • The timezone must be set. Either:
    • Set the date.timezone option in php.ini. For example:
      date.timezone = "America/Los_Angeles"
    • Use the date_default_timezone_set() function in your report application.

To configure for PHP, set the value of the PHP_HOME environment variable, found in the PHP environment set, to your local PHP directory.

  1. Select Tools >> Genero Configurations.
  2. Under the Environment Sets section, select PHP.
    The PHP_HOME environment variable is listed under the Environment Variables section.
  3. Select the PHP_HOME environment variable.
  4. Click the Edit icon to open the Environment Variable dialog.
  5. Set Value to the local directory for your PHP installation.
    Tip: The Type combobox tells you what type of value is expected.
  6. Click OK until all dialogs close.
  7. Run the OrderReportBAMPhp demo to verify your configuration.
    See Run the OrderReportBAMPhp report demo for details on running the demo.
  8. Configure your PHP database connection.
    This procedure assumes the use of the PHP Demo Database Connection, which was selected by default with the PHP configuration. To connect to another database, you will need to create a copy of the PHP Demo Database Connection and modify that copy. See Environment Sets needed for GRW for PHP.