When setting up a survey to work with the web server database, you can include the database connection settings within Lighthouse Studio. Optionally, Lighthouse Studio allows you to configure the server with environment variables that the Perl code will check for first (before looking to the project files uploaded to the server). Before using environment variables on your server, you should specify in the database configuration settings of the Hosting Management window that you are using environment variables.
If configuring for use with Lighthouse Studio surveys, the following environment variables (in upper caps) are available:
SSI_DATABASE_TYPE
Required. Use 'mysql' for MySQL, or 'ODBC' (case sensitive) for Microsoft SQL Server.
SSI_DATABASE_ADDRESS
Required. Specifies the IP address (or DNS name) of the server hosting the database. If the database is on the same server as the survey, you can use the name 'localhost'.
SSI_DATABASE_NAME
Required. Specifies the database name.
SSI_DATABASE_USERNAME
Required. Specifies the database user account.
SSI_DATABASE_PASSWORD
Required. Specifies the database user password.
SSI_DATABASE_PORT
Optional. If not specified (or specified as blank), the default port will be used.
SSI_DATABASE_DRIVER
Optional. Can be set to a specific value if needed by the database.
SSI_DATABASE_MAX_FIELDS_TABLE
Optional. Specifies the maximum number of fields in each database table. If the number of survey variables exceeds this value, a new table will be created for the new variables. It is recommended to keep the value at 100.
SSI_RESPNUM_START
Optional. Specifies the value at which to start respondent numbering. This value can be set to an integer greater than or equal to 1.
The methods for creating environment variables vary by operating system. Consult with your ISP or IT department when setting up environment variables on your servers.
NOTE: If using a Windows-based server and Internet Information Services (IIS), newly added environment variables will not be recognized by IIS until either:
1) The server is rebooted, or
2) IIS is restarted from a PowerShell or command prompt ("iisreset /restart"). Using the Restart link within the IIS management window will not work.