#..\library\pwu\pwu-1.6.0.2.dll # COMMENT: CONFIG FILE header_charset = iso-8859-1 error_reporting = on error_halt = off output_buffering = on output_compression = on session_path = "session/sess.sds" session_life_time = 25 upload_max_size = 20
Line one contains the path (preceded by pound sign) to the DLL/DSO if you are using dynpwu.pas. If you are using pwumain.pas then no path on line one is required.
Note: In version 1.5, the config file is named pwu.conf for both operating systems.
An example of a config file is included in your zip or gzip package that you downloaded from sourceforge in the /src/conf/ or /config/ directory. There are also config files in the subdirectories inside the /examples/ folder.
Paths inside the config file can be absolute or relative.
Even if your cgi bin directory is not inside DOCROOT on the server, it is still relative to it in some way for example $DOCROOT/../../sub/ is two directories back from public html.
The global location of the config file is $DOCROOT/pwu/conf/ or $DOCROOT/../pwu/conf/ where DOCROOT resembles your document root directory, such as /public_html/ or /www/ or /home/user/www/ or c:\program files\apache group\htdocs\. The utilities search first for a config file in the directory that the CGI program is being launched from, then they search for default global locations such as /public_html/pwu/conf/.
Note that in version 1.5 and 1.6.0.0 there is no global config file. Only in 1.6.0.1 or latest SVN was this feature introduced.
The $DOCROOT macro is internally determined by making a call to the DOCUMENT_ROOT server variable (see pwuenvvar). The web server must launch the program for the global config file to have knowledge about document root; and since running a program from the command line does not launch the program through the web server, DOCUMENT_ROOT is unknown from the console. In other words, use local config files in the cgi program's directory if you want your program to work at the command line without any web server, or use 1.6.1 and disable the CFG_ON define.