Lighthouse Studio Help

F: Configuring Database Environment Variables

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:




Required. Use 'mysql' for MySQL, or 'ODBC' (case sensitive) for Microsoft SQL Server.




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'.




Required. Specifies the database name.




Required. Specifies the database user account.




Required. Specifies the database user password.




Optional. If not specified (or specified as blank), the default port will be used.




Optional. Can be set to a specific value if needed by the database.




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.




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.

Created with Help & Manual 8 and styled with Premium Pack Version 4 © by EC Software