SQL Database Backend

  Using a database instead of a plain text file can significantly improve performance when dealing with large lists. Using the SQL option will entail a bit more work for the administrator, but if you run a large list, the work is well worth it.

Compatible Databases

  The SQL features of Subscriber PRO have been tested with MySQL (Windows/Linux) and PostgreSQL (Linux). Other database software should work as well. There are no functions or data types of specific databases used. In fact, the only data types used by default (though you can specify any type with your slots) are varchar and bit (which translates into int(1)). If you would like to specify different data types, for some reason, you can easily change the code in the script. The only scripts that create tables are admin.cgi, convert_to_sql.cgi, and firstrun.cgi. You can search the scripts for every instance of "CREATE TABLE subscriberpro_" and you can change the data types as you wish.

Converting

  If you have an existing mailing list managed by Subscriber PRO, then all you need to do is run the convert_to_sql.cgi script. However, before you can run it, you must log in under the overall admin script (admin.cgi) and edit your variables. The first thing you will need to do is turn on SQL support, which is located on the variable editing screen. Then, when you return the main menu, you will see a new option to edit your SQL variables. Click on that, and enter the information that is needed there. After submitting that form, then you can run the convert_to_sql.cgi script.

Additional Security

  By default, SQL variables are stored in a file named sqlvars.pl in the main Subscriber directory. This file includes a call to Perl at the top of the file. The reasoning for this is that if the file is accessed via a web browser, your server will attempt to execute it as a Perl script. This will, however, result in an error, as the file has no printable content, only variable definitions. This is done because the password for the SQL user account is stored in plain text (it is not encrypted).

  Therefore, you may wish to move this variables file to a more secure location (such as a directory that is not publicly accessible). To have the file read and created elsewhere, open the common file that resides in the main Subscriber directory. Edit the variable $sqlvars_path to reflect the path to the file. Note that you must move the file to its new location if it has already been created (so that it can be read). Or, you can change the path before the file is written (which is done by running convert_to_sql.cgi or firstrun.cgi).

Back to Index