File: icconfig.pod

package info (click to toggle)
interchange-doc 4.8.3-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 17,396 kB
  • ctags: 4,509
  • sloc: makefile: 46
file content (2669 lines) | stat: -rw-r--r-- 85,285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
=head1 NAME

icconfig - Configuration Reference

=head1 DESCRIPTION

=head1 Interchange Configuration Files

The Red Hat Interchange 4.8 Configuration Reference is an alphabetical
reference to the configuration directives used in Interchange global
and catalog configuration files.

Interchange has multiple catalog capability, and therefore splits its
configuration into two pieces. One is global, interchange.cfg, and
affects every catalog running under it. The other, catalog.cfg is
specific to an individual catalog, and has no effect on other
catalogs.

=head2 Directive syntax

Configuration directives are normally specified with the directive as
the first word on the line, with its value or values following.
Capitalization of the directive name is not signifigant. Leading and
trailing whitespace is stripped from the line.

=over 4

=item Including files in directives

=back

Additional files may be called with an include file notation like
this:

 DirectiveName <includefile

Files included from interchange.cfg are relative to the Interchange
software directory. Files included from catalog.cfg are relative to
the catalog directory.

=over 4

=item

Here documents

=back

A "here document" can be used to spread directive values over several
lines, with the usual Perl <<MARKER syntax. No semicolon is used to
terminate the marker. The closing marker must be the only thing on the
line. No leading or trailing characters are allowed, not even
whitespace. Here is a hypothetical directive using a here document:

 Direct    setting1
    setting2
    setting3
EOD

veName <<EOD

That is equivalent to:

 DirectiveName setting1 setting2 setting3

=over 4

=item Include single setting from file

Value can be pulled from a file with <file:

Variable MYSTUFF <file

This works well for includes that must be of the highest possible
performance. They can be simply placed in a page with __VARIABLE__.

=item include

Other configuration files can be included in the current one. For
example, common settings can be set in one file:

include common.cfg

Or all files in one directory:

include usertag/*

=item ifdef and ifndef

ifdef/endif and ifndef/endif pairs can be used:

Variable ORDERS_TO email_a
ifdef ORDERS_TO
ParseVariables Yes
MailOrderTo __ORDERS_TO__
ParseVariables No
endif

ifdef ORDERS_TO =~ /foo.com/
# Send all orders at foo.com to one place now
# Set ORDERS_TO to stop default setting
Variable  ORDERS_TO  1
MailOrderTo   orders@foo.com
endif

ifdef ORDERS_TO eq 'nobody@nowhere.com'
# Better change to something else, set ORDERS_TO to stop default
Variable  ORDERS_TO  1
MailOrderTo   someone@somewhere.com
endif

ifndef ORDERS_TO
#Needs to go somewhere....
MailOrderTo  webmaster@localhost
endif

dress

=back

=head1 interchange.cfg

The VendRoot directory, specified in the main program interchange,
is the default location of all of the Interchange program,
configuration, special, and library files. Unless changed in the call
to interchange, the main Interchange server configuration file will
be interchange.cfg in the VendRoot directory.

The directives defined in interchange.cfg affect the entire
Interchange server and all catalogs running under it. Multiple
Interchange servers may be run on the same machine with totally
independent operation.

Following is an alphabetical listing of all global configuration
directives.

=head2 ActionMap *global*

Allows setting of Interchange form actions, usually with a Perl
subroutine. Actions are page names like:

 process  Perform a processing function
order    Order items
scan     Search based on path info
search   Search based on submitted form variables

The global version of ActionMap applies to all catalogs. If the same
action is specified in catalog.cfg, it will pertain. See
ActionMap in that section.

=head2 AddDirective *global*

Adds a configuration directive that will be parsed for every
catalog.cfg file. Accepts three parameters: the name of the
directive, the name of the parser (if any), and the default value (if
any). The following definition would add a directive "Foo," with
parser "parse_bar," and a default value of "Hello, world!":

   AddDirective  Foo  bar "Hello, world!"

If the parser is not defined, the directive value will be scalar and
the same as what the user passes in the config file. If defined, the
parser must be extant before it can be referenced, is always resident
in Vend::Config, and begins with the string parse_. Examples can be
found in the files in the distribution software directory compat/.

=head2 AdminSub *global*

Marks a global subroutine for use only by catalogs that are set to
AllowGlobal (see below). Normally global subroutines can be
referenced (in embedded Perl) by any catalog.

   AdminSub  dangerous

=head2 AllowGlobal *global*

Specifies catalog identifiers that may define subroutines and UserTag
entries that can operate with the full permissions of the server.
B<Don't use this unless the catalog user is trusted implicitly.>
Default is blank.

   AllowGlobal  simple

Using AllowGlobal is never necessary, and is always dangerous in a
multi-user environment. Its use is not recommended.

=head2 AutoVariable *global*

Specifies directives which should be translated to Variable settings.
For scalars, the directive name becomes the Variable name and yields
its value, i.e. ErrorFile becomes __ErrorFile__, which would
by default be error.log. Array variables have a _N added, where
_N is the ordinal index, i.e. SafeUntrap becomes
__SafeUntrap_0__, __SafeUntrap_1__, etc. Hash variables
have a _KEY added, i.e. SysLog becomes __SysLog_command__,
__SysLog_facility__, etc. Doesn't handle hash keys that have
non-word characters or whitespace. Only single-level arrays and hashes
are translated properly.

See AutoVariable in catalog.cfg.

=head2 Catalog *global*

Specifies a catalog that can run using this Interchange server. This
directive is usually inserted into interchange.cfg by the makecat
program when you build a new catalog.

There are three required parameters, as shown in this example:

   Catalog  simple /home/interchange/simple /cgi-bin/simple

The first is the name of the catalog. It will be referred to by that
name in error, warning, and informational messages. It must contain
only alphanumeric characters, hyphens, and underscores. It is highly
recommended that it be all lower case.

The second is the base directory of the catalog. If the directory does
not contain a catalog.cfg file, the server will report an error and
refuse to start.

The third is the SCRIPT_NAME of the link program that runs the
catalog. This is how the catalog is selected for operation. Any number
of alias script names may be specified as additional parameters. This
allows the calling path to be different while still calling the same
catalog:

   Catalog  simple /home/interchange/simple /cgi-bin/simple /simple

This is useful when calling an SSL server or a members-only alias that
requires a username/password via HTTP Basic authorization. All
branched links will be called using the aliased URL.

The script names must be unique among CGI program paths that run on
this server; the same name cannot be used for more than one catalog
unless the FullURL directive is specified. In this case, the
parameter may be specified as:

 www.yourcompany.com/cwww.theirs.com/cgi-bin/simple

i-bin/simple

Each of those 'simple' catalogs would then call a different catalog.

Optionally, individual Catalog directives that specify each of the
different parameters may be used. The equivalent of our original
example directive above is:

   Catalog simple directory /home/interchange/simple
   Catalog simple script    /cgi-bin/simple
   Catalog simple alias     /simple

Global directives may be specified that will change for that catalog
only. This is mostly useful for ErrorFile and DisplayErrors:

   Catalog simple directive ErrorFile /var/log/interchange/simple_error.log

=head2 CheckHTML *global*

Set to the name of an external program that will check the users HTML
when they set [flag checkhtml] or [tag flag checkhtml][/tag] in
their page.

   CheckHTML  /usr/local/bin/weblint

=head2 ConfigAllAfter *global*

The name of a file (or files) which should be read as a part of every
catalog's configuration, after any other configuration files are read.
Default is catalog_after.cfg.

   ConfigAllAfter   check_actions.cfg check_variables.cfg

=head2 ConfigAllBefore *global*

The name of a file (or files) which should be read as a part of every
catalog's configuration, before any other configuration files are
read. Default is catalog_before.cfg.

   ConfigAllBefore   set_actions.cfg set_variables.cfg

=head2 ConfigParseComments *global*

Set to No if you want old-style '#include', '#ifdef', or '#ifndef' to
be treated as the comments they appear to be. The default is Yes,
which means both '#include' and 'include' do the same thing. (Use a
space after the '#' if you really want to comment out the command.)

Interchange prior to version 4.7 used a different syntax for
meta-directives 'include', 'ifdef', and 'ifndef' in configuration
files. The commands were borrowed from the C preprocessor, and true to
their C heritage, they started with '#': '#include', '#ifdef',
'#ifndef'. Interchange configuration files, unlike C, uses '#' to
begin one-line comments, which meant that a newcomer at first glance
might assume that:

 #Variable DEBUG 1
#include more.cfg

were both comments, when in fact the second was a live #include
command.

To begin to make things more consistent, Interchange 4.7 and up now
recognize those meta-directives without the leading '#', and the
included demo catalog sets this directive to No so that lines
beginning with '#' really are skipped as comments, regardless of what
comes after.

=head2 Database *global*

Defines a database which is global and available to all catalogs.
Writing can be controlled by catalog. See Database.

=head2 DataTrace *global*

Set DBI to trace at the level specified. Valid values are:

0 - Trace disabled.

1 - Trace DBI method calls returning with results or errors.

2 - Trace method entry with parameters and returning with results.

3 - As above, adding some high-level information from the driver and
some internal information from the DBI.

4 - As above, adding more detailed information from the driver. Also
includes DBI mutex information when using threaded Perl.

5 and above - As above but with more and more obscure information.

Trace level 1 is best for most Interchange debug situations. Trace
will only be enabled when DebugFile is specified, as that file is
the target for the trace. Example:

    DataTrace   1

Default is 0. Directive added in 4.7.0.

=head2 DebugFile *global*

Names a file, relative to the Interchange root directory, which should
store the output of logDebug statements, and warnings if warnings
are enabled.

        DebugFile  /tmp/icdebug

=head2 DisplayErrors *global*

While all errors are reported in the error log file, errors can also
be displayed by the browser. This is convenient while testing a
configuration. Unless this is set, the DisplayErrors setting in the
user catalogs will have no effect. Default is No.

   DisplayErrors       Yes

B<Note: >This changes the value of $SIG{__DIE__} and may have other
effects on program operation. This should NEVER be used for normal
operation.

=head2 DomainTail *global*

Implements the domain/IP session qualifiers so that only the major
domain is used to qualify the session ID. This is a compromise on
security, but it allows non-cookie-accepting browsers to use multiple
proxy servers in the same domain. Default is Yes.

   DomainTail No

If encrypting credit cards with PGP or GPG, or are using a payment
service like CyberCash, look at the WideOpen directive, which
enables more browser compatibility at the cost of some security.

=head2 DumpStructure *global*

Tells Interchange to dump the structure of catalogs and the
Interchange server to a file with the catalog name and the extension
.structure. Use this to see how directives have been set.

=head2 EncryptProgram *global*

Specifies the default encryption program that should be used to
encrypt credit card numbers and other sensitive information. Default
is gpg if found on the system; then pgpe, if found; then pgp,
and finally none, disabling encryption.

This is used to set the default in catalog.cfg, which has its own
independent setting of EncryptProgram.

=head2 Environment *global*

Environment variables to inherit from the calling CGI link program. An
example might be PGPPATH, used to set the directory which PGP will use
to find its key ring.

   Environment  MOD_PERL REMOTE_USER PGPPATH

=head2 ErrorFile *global*

Sets the name of the global error log. The default is error.log in
the Interchange software directory.

   ErrorFile  /var/log/interchange/log

Of course, the user ID running the Interchange server must have
permission to write that file.

Optionally, syslog error logging can be set up as well. See SysLog.

=head2 FormAction *global*

Allows a form action (like the standard ones return, submit,
refresh, etc.) to be set up. It requires a Perl subroutine as a
target:

   FormAction foo <<EOR
   sub {
       $CGI->{mv_nextpage} = 'bar';
   }
   EOR

If it returns a true (non-zero, non-empty) value, Interchange will
display the page defined in $CGI->{mv_nextpage}. Otherwise,
Interchange will not display any page. The default Interchange actions
can be overridden, if desired. There is also a catalog-specific
version of this directive, which overrides any action of the same
name.

The global version affects all catalogs -- there is also a
catalog-specific version of FormAction which is protected by Safe.

=head2 FullUrl *global*

Normally Interchange determines which catalog to call by determining
the SCRIPT_NAME from the CGI call. This means that different (and
maybe virtual) hosts cannot use the same SCRIPT_NAME to call different
catalogs. Set FullUrl to Yes to differentiate based on the calling
host. Then, set the server name in the Catalog directive accordingly,
such as yourdomain.com/cgi-bin/simple. A yes/no directive, the
default is No.

   FullUrl  Yes

If it is set in this fashion, all catalogs must be defined in this
fashion. NOTE: The individual catalog setting will not work, as this
is used before the catalog name is known.

=head2 GlobalSub *global*

Defines a global subroutine for use by the [perl sub] subname arg
/perl] construct. Use the "here document" capability of Interchange
configuration files to make it easy to define:

   GlobalSub <<EOF

   sub count_orders {
       my $counter = new File::CounterFile "/tmp/count_orders", '1';
       my $number = $counter->inc();
       return "There have been $number orders placed.\n";
   }
   EOF

As with Perl "here documents," the EOF (or other end marker) must be
the ONLY thing on the line, with no leading or trailing white space.
Do not append a semicolon to the marker. (The above marker appears
indented. It should not be that way in the file!)

IMPORTANT NOTE: These global subroutines are not subject to security
checks. They can do most anything! For most purposes, scratch
subroutines or catalog subroutines (also Sub) are better.

GlobalSub routines are subject to full Perl use strict checking, so
errors are possible if lexical variables or complete package
qualifications are not used for the variables.

=head2 HammerLock *global*

The number of seconds after which a locked session could be considered
to be lost due to malfunction. This will kill the lock on the session.
Only here for monitoring of session hand-off. If this error shows up
in the error log, the system setup should be examined. Default is 30.

   HammerLock          60

This mostly doesn't apply to Interchange when using the default
file-based sessions.

=head2 HitCount *global*

Increments a counter in ConfDir for every access to the catalog.
The file is named hits.catalogname, where catalogname is the
short catalog identifier. A Yes/No directive, default is No.

   HitCount  Yes

=head2 HouseKeeping *global*

How often, in seconds, the Interchange server will "wake up" and look
for user reconfiguration requests and hung search processes. On some
systems, this wakeup is the only time the server will terminate in
response to a stop command. Default is 60.

   HouseKeeping    5

=head2 Inet_Mode *global*

Determines whether INET-domain sockets will be monitored on startup.
Overridden by the command-line parameter -i. Default is Yes.

=head2 IpHead *global*

Implements the domain/IP session qualifiers so that only the first
IpQuad dot-quads of the IP address are used to qualify the session
ID. The default is 1. This is a slight compromise on security, but it
allows non-cookie-accepting browsers, like AOL's V2.0, to use multiple
proxy servers.

DomainTail is preferable unless one of your HTTP servers does not
do host name lookups. Default is No, and DomainTail must be set to
No for it to operate.

   IpHead Yes

=head2 IpQuad *global*

The number of dot-quads that IpHead will look at. Default is 1.

   IpQuad  2

=head2 Locale *global*

Sets the global Locale for use in error messages. Normally set from
a file's contents, as in the example before:

   Locale <locale.error

=head2 LockoutCommand *global*

The name of a command (as it would be entered from the shell) that
will lock out the host IP of an offending system. The IP address will
be substituted for the first occurrence of the string %s. This will be
executed with the user ID that Interchange runs under, so any commands
that require root access will have to be wrapped with an SUID program.

On Linux, a host may be locked out with:

   ipfwadm -I -i deny -S %s

This would require root permissions, however, under normal
circumstances. Use sudo or another method to wrap and allow the
command.

A script can be written which modifies an appropriate access control
file, such as .htaccess for your CGI directory, to do another level of
lockout.  A simple command line containing perl -0777 -npi -e
's/deny/deny from %s\ndeny/' /home/me/cgi-bin/.htaccess would work as
well (remember, the %s will become the IP address of the offending
user).

   LockoutCommand   lockout %s

=head2 LockType *global*

Allows selection of file locking method used throughout Interchange.
Options are 'flock', 'fcntl', and 'none'. Added in 4.7.0.

Default is flock. See the flock(2) manpage for details.

The fcntl setting is needed for NFS filesystems; for NFS-based locking
to work, the NFS lock daemon (lockd) must be enabled and running on
both the NFS client and server. Locking with fcntl works on Linux and
should work on Solaris, but is not guaranteed to work on all OSes.

The none setting turns off file locking entirely, but that is never
recommended. It might be useful to check if locking is causing hangs
on the system.

If you are only accessing sessions on an NFS-mounted directory but the
rest of Interchange is on the local filesystem, you can instead set
the SessionType catalog directive to 'NFS', which enables fcntl
locking for sessions only on a per-catalog basis.

=head2 Mall *global*

Set to Yes to issue cookies only for the current catalog's script.
By default, when Interchange issues a cookie it does so for the base
domain. This will allow multiple catalogs to operate on the same
domain without interfering with each others session ID.

A yes/no directive.

   Mall   Yes

=head2 MaxServers *global*

The maximum number of servers that will be spawned to handle page
requests. If more than MaxServers requests are pending, they will be
queued (within the defined capability of the operating system, usually
five pending requests) until the number of active servers goes below
that value.

   MaxServers     4

Default is 10.

=head2 NoAbsolute *global*

Whether Interchange [file ...] and other tags can read any file on
the system (that is readable by the user id running the Interchange
daemon). The default is No, which allows any file to be read. This
should be changed in a multi-user environment to minimize security
problems.

   NoAbsolute     Yes

=head2 PIDcheck *global*

If non-zero, enables a check of running Interchange processes during
the housekeeping routine. If a process has been running (or is hung)
for longer than PIDcheck seconds then a kill -9 will be issued and the
server count decremented. During the housekeeping routine, the number
of servers checked by MaxServers will be recounted based on PID
files.

Default is 0, disabling the check.

   PIDcheck   300

If have long-running database builds, this needs to be disabled. Set
it to a high value (perhaps 600, for 10 minutes), or use the offline
script.

=head2 PIDfile *global*

The file which will contain the Interchange server process ID so that
it can be read to determine which proces should be sent a signal for
stopping or reconfiguring the server.

   PIDfile  /var/run/interchange/interchange.pid

This file must be writable by the Interchange server user ID.

=head2 Profiles *global*

Names a file (or files) which contain OrderProfile and
SearchProfile settings that will apply for all catalogs.

   Profiles     etc/profiles.common

=head2 SafeUntrap *global*

Sets the codes that will be untrapped in the Safe.pm module and
used for embedded Perl and conditional operations. View the Safe.pm
documentation by typing perldoc Safe at the command prompt. The
default is ftfile sort, which untraps the file existence test
operator and the sort operator. Define it as blank to prevent any
operators but the default restrictive ones.

   SafeUntrap     ftfile sort ftewrite rand

=head2 SendMailProgram *global*

Specifies the program used to send email. Defaults to
'/usr/lib/sendmail'. If it is not found at startup, Interchange will
return an error message and refuse to start.

   SendMailProgram     /bin/mailer

A value of 'none' will disable the sending of emailed orders. Orders
must be read from a tracking file, log, or by other means.

=head2 SOAP *global*

If set to Yes, allows handling of SOAP rpc requests.

=head2 SOAP_Host

The list of hosts that are allowed to connect to for SOAP rpc
requests. Default is localhost 127.0.0.1.

=head2 SOAP_MaxRequests

The maximum number of requests a SOAP rpc server will handle before it
commits suicide and asks for a replacement server. This prevents
runaway memory leaks.

=head2 SOAP_Perms

The permissions that should be set on a SOAP UNIX-domain socket.
Default is 0660, which allows only programs running as the same UID
as Interchange to access the socket.

=head2 SOAP_Socket

A list of sockets which should be monitored for SOAP requests. If they
fit the form NNN.NNN.NNN.NNN:PPPP, they are IP addresses and ports for
monitoring INET-domain sockets, any other pattern is assumed to be a
file name for monitoring in the UNIX domain.

   SOAP_Socket 12.23.13.31:7770 1.2.3.4:7770 /var/run/interchange/soap

=head2 SOAP_StartServers

The number of SOAP servers which should be started to handle SOAP
requests. Default is 1.

   SOAP_StartServers   10

=head2 SocketFile *global*

The name of the file which is used for UNIX-domain socket
communications. Must be in a directory where the Interchange user has
write permission.

   SocketFile  /var/run/interchange/interchange.socket

Default is etc/socket or the value of the environment variable
MINIVEND_SOCKET. If set, it will override the environment. It can be
set on the command line as well:

   bin/interchange -r SocketFile=/tmp/interchange.socket

=head2 SocketPerms *global*

The permissions (prepend a 0 to use octal notation) that should be
used for the UNIX-domain socket. Temporarily set this to 666 on the
command line to debug a permission problem on vlink.

   bin/interchange -r SocketPerms=0666

=head2 StartServers

The number of Interchange page servers which should be started to
handle page requests when in PreFork mode. Default is 1.

   SOAP_StartServers   10

=head2 SubCatalog *global*

Allows definition of a catalog which shares most of the
characteristics of another catalog. Only the directives that are
changed from the base catalog are added. The parameters are: 1) the
catalog ID, 2) the base catalog ID, 3) the directory to use (typically
the same as the base catalog), and 4) the SCRIPT_NAME that will
trigger the catalog. Any additional parameters are aliases for the
SCRIPT_NAME.

The main reason that this would be used would be to conserve memory in
a series of stores that share most of the same pages or databases.

   SubCatalog   sample2 sample /usr/catalogs/sample /cgi-bin/sample2

=head2 SysLog *global*

Set up syslog(8) error logging for Interchange.

   SysLog  command  /usr/bin/logger
   SysLog  tag      int1
   SysLog  alert    local3.warn
   SysLog  warn     local3.info
   SysLog  info     local3.info
   SysLog  debug    local3.debug

This would cause global errors to be logged with the command:

   /usr/bin/logger -t int1 -p local3.alert

and cause system log entries something like:

   Oct 26 17:30:11 bill int1: Config 'co' at server startup
   Oct 26 17:30:11 bill int1: Config 'homefn' at server startup
   Oct 26 17:30:11 bill int1: Config 'simple' at server startup
   Oct 26 17:30:11 bill int1: Config 'test' at server startup
   Oct 26 17:30:13 bill int1: START server (2345) (INET and UNIX)

This would work in conjunction with a UNIX syslogd.conf entry of:

        # Log local3 stuff to Interchange log
        local3.*                /var/log/interchange.log

A custom wrapper can be created around it to get it to behave as
desired. For instance, if you didn't want to use syslog but instead
wanted to log to a database (via DBI), you could create a Perl script
named "logdatabase" to log things:

    #!/usr/bin/perl

    my $script_name = "logdatabase";
    use DBI;
    use Getopt::Std;

    getopts('d:p:T:k:')
        or die "$script_name options: $@\n";

    use vars qw/$opt_d $opt_p $opt_T $opt_k/;

    my $dsn   = $opt_d || $ENV{DBI_DSN};
    my $template = $opt_T
        || "insert into log values ('~~KEY~~', '~~LEVEL~~', '~~MSG~~')";

    my $dbh = DBI->connect($dsn)
        or die "$script_name cannot connect to DBI: $DBI::errstr\n";

    my %data;

    $data{KEY} = $opt_k || '';

    local ($/);
    $data{MSG} = <>;

    $data{LEVEL} = $opt_p || 'interchange.info';

    $template =~ s/\~\~(\w+)\~\~/$dbh->quote($data{$1})/;

    my $sth = $dbh->prepare($template)
        or die "$script_name error executing query: $template\n";

    $sth->execute()
        or die "$script_name error executing query: $template\n";

    exit;

=head2 TcpHost *global*

When running in INET mode, using tlink, specifies the hosts that
are allowed to send/receive transactions from any catalog on this
Interchange server. Can be either an name or IP number, and multiple
hosts can be specified in a space-separated list. Default is
localhost.

   TcpHost         localhost secure.domain.com

=head2 TcpMap *global*

When running in INET mode, using tlink or the internal HTTP server,
specifies the port(s) which will be monitored by the Interchange
server. Default is 7786.

To use the internal HTTP server (perhaps only for password-protected
queries), a catalog may be mapped to a port. If three catalogs were
running on the server www.akopia.com, named simple, sample,
and search, the directive might look like this:

   TcpMap    7786 -  7787 simple 7788 sample 7789 search

B<Note: >To map large numbers of ports, use the <<MARKER here document
notation in interchange.cfg. With this in effect, the internal HTTP
server would map the following addresses:

   *:7786   mv_admin
   *:7787   simple
   *:7788   sample
   *:7789   search

B<Note: >This does not pertain to the use of tlink, which still
relies on the CGI SCRIPT_PATH. To enable this, the SCRIPT_PATH aliases
/simple, /sample, etc. must be set in the Catalog directive. This
would look like:

 Catalog  simple  /home/interchange/catalogs/simple /cgi-bin/simple /simple

To bind to specific IP addresses, add them in the same fashion that
they would as an Apache Listen directive:

   TcpMap <<EOF
       127.0.0.1:7786       -
       www.akopia.com:7787  -
   EOF

B<Note: >As usual, the EOF should be at the beginning of a line with
no leading or trailing whitespace.

=head2 TemplateDir *global*

Sets a directory which will be searched for pages if not found in the
user's pages directory. Interchange uses this; use it to supply
some default pages so the user will not have them in their directory.

   TemplateDir    /usr/local/interchange/default_pages

The user's page, if it exists, will take precedence. There is also a
catalog-specific version of this directive. If a page is found in that
directory (or directories), it will take precedence.

=head2 TolerateGet *global*

Set to 'Yes' to enable parsing of both GET data and POST data when a
POST has been submitted. The default is 'No', which means that GET
data is ignored during a POST. Unfortunately this has to be a global
setting because at URL parse time, the Interchange daemon doesn't yet
know which catalog it's dealing with (due to catalog aliases, etc.).

=head2 UrlSepChar *global*

Sets the character which separates form parameters in
Interchange-generated URLs. Default is &.

=head2 Unix_Mode *global*

Determines whether the UNIX-domain socket will be monitored on
startup. Overridden by the command-line parameter -u. Default is
Yes.

=head2 UserTag *global*

This defines a UserTag which is global in nature, meaning not limited
by the Safe.pm module, and is is available to all Interchange
catalogs running on the server. Otherwise, this is the same as a
catalog UserTag.

=head2 Variable *global*

Defines a global variable that will be available in all catalogs with
the notation @@VARIABLENAME@@. Variable identifiers must begin with a
capital letter, and can contain only word characters (B<A-Z,a-z,0-9>
and underscore). They are case-sensitive. If using the
ParseVariables directive, only variables in ALL CAPS will be
parsed. These are substituted first in any Interchange page, and can
contain any valid Interchange tags including catalog variables.

   Variable   DOCUMENT_ROOT   /usr/local/etc/httpd/htdocs

If a variable is called with @_VARIABLE_@, and there is no catalog
Variable with its name, the global Variable value will be inserted.

There are several standard variables which should not be used:

=over 4

=item MV_FILE

Name of the last file read in, as in [file ...] or an externally
located perl routine.

=item MV_NO_CRYPT

Set this to 1 to disable encrypted passwords for the AdminUser.

=item MV_PAGE

Name of the last page read in, as in the page called with mv_nextpage
or mv_orderpage.

=item CURRENCY, MV_CURRENCY

The current locale for currency.

=item LANG, MV_LANG

The current locale for language.

=back

Some global variables can be set to affect Interchange:

=over 4

=item MV_DOLLAR_ZERO

This determines what Interchange does to Perl's $0 variable, which
contains the operating system's name of the running process, for
example in the ps(1) or top(1) commands. Valid settings are:

=back

 Setting                           Result
 (not set)                         'interchange'
 0                                 (do nothing)
 1                                 'interchange --> (CATROOT)'
 string                            'string'

=over 4

=item

Note that this is set globally once only when the Interchange daemon
is started, so it's pointless to change the variable after that.

=back

=head2 VarName *global*

Sets the names of variables that will be remapped to and from the URL
when Interchange writes it. For instance, to display the variable
mv_session_id as session in the users URL:

   VarName   mv_session_id  session

The default can also be set in the etc/varnames file after the
first time Interchange is run. Setting it in interchange.cfg is
probably better for clarity.

There is also a catalog-specific version of this setting.

=head1 catalog.cfg

Each catalog must have a catalog.cfg file located in its base
catalog directory. It contains most of the configurable parameters for
Interchange. Each is independent from catalog to catalog.

Additional configuration techniques are available in the
catalog.cfg file. First, set a Variable and use its results in a
subsequent configuration setting if ParseVariables is on:

   Variable   SERVER_NAME  www.akopia.com
   Variable   CGI_URL      /cgi-bin/demo

   ParseVariables Yes
   VendURL    http://__SERVER_NAME____CGI_URL__
   ParseVariables No

=over 4

=item Define subroutine watches

Almost any configuration variable can be set up to be tied to a
subroutine if the Tie::Watch module is installed. It uses a notation
like the <<HERE document, but <&HERE is the notation. See
I<Interchange Programming> for details.

=back

=head2 Programming Watch Points in catalog.cfg

Almost any configuration variable can be set up to be tied to a
subroutine if the Tie::Watch module installed. It uses a notation
like the <<HERE document, but <&HERE is the notation. Here is a simple
case:

   MailOrderTo orders@akopia.com
   MailOrderTo <&EOF
   sub {
       my($self, $default) = @_;
       if($Values->{special_handling}) {
           return 'vip@akopia.com';
       }
       else {
           return $default;
       }
   }
   EOF

When the order is mailed out, if the user has a variable called
special_handling set in their session (from UserDB, perhaps), the
order will be sent to 'vip@akopia.com.' Note the single quotes to
prevent problems with the @ sign. Otherwise, the order will get sent
to the previously defined value of orders@akopia.com.

If the configuration value being watched is a SCALAR, the subroutine
gets the following call:

   &{$subref}(SELF, PREVIOUS_VALUE)

The subroutine should simply return the proper value.

SELF is a reference to the Tie::Watch object (read its documentation
for what all it can do) and PREVIOUS_VALUE is the previously set
value for the directive. If set after the watch is set up, it will
simply have the effect of destroying the watch and having
unpredictable effects. (In the future, a "Store" routine may be able
to be set up that can subsequently set values).

If the configuration value being watched is an ARRAY, the
subroutine gets the following call:

   &{$subref}(SELF, INDEX, PREVIOUS_VALUE)

INDEX is the index of the array element being accessed. Setting up
watch points on array values is not recommended. Most Interchange
subroutines call arrays in their list context, and no access method is
provided for that.

If the configuration value being watched is a HASH, the subroutine
gets the following call:

   &{$subref}(SELF, KEY, PREVIOUS_VALUE)

KEY is the index into the hash, an example of HASH type
Interchange configuration values. NOTE: The following is not
recommended for performance reasons. The Variable is a commonly used
thing and should not bear the extra overhead of tieing, but it
illustrates the power of this operation:

   Variable TESTIT Unwatch worked.

   Variable <&EOV
   sub {
       my ($self, $key, $orig) = @_;
       if($key eq 'TESTIT') {
           # only the first time
           if($Scratch->{$key}++) {
               $self->Unwatch();
               return $orig->{TESTIT};
           }
           else {
               return "Tie::Watch works! -- name=$Values->{name}";
           }
       }
       else {
           return $orig->{$key};
       }
   }
   EOV

The first time __TESTIT__ is called for a particular user, it will
return the string "Tie::Watch works! -- name=" along with their name
set in the session (if that exists). Any other variables will receive
the value that they were set to previously. Once the TESTIT key has
been accessed for that user, the watch is dropped upon the next
access.

=head2 Configuration Directives in catalog.cfg

All directives except MailOrderTo and VendURL have default
values and are optional, though most catalogs will want to configure
some of them.

=head2 ActionMap

Allows setting of Interchange actions, usually with a Perl subroutine.
Actions are page names like:

 process  Perform a processing function
order    Order items
scan     Search based on path info
search   Search based on submitted form variables

These are the standard supplied actions for Interchange. They can be
overwritten with user-defined versions if desired. For example, to
ignore the order action, set:

   ActionMap  order  sub { return 1 }

When the leading part of the incoming path is equal to order, it
will trigger an action. The page name will be shifted up, and the
order stripped from the page name. So this custom order action
would essentially perform a no-op, and a URL like:

   <A HREF="[area order/nextpage]"> Go to the next page </A>

would be the equivalent of "[area nextpage]." If the action does not
return a true (non-zero, non-blank) status, no page will be displayed
by Interchange, not even the special missing page. A response may
also be generated via Perl or MVASP.

The standard process action has a number of associated
FormAction settings. Besides using Perl, Interchange tags may be
used in an action, though they are not nearly as efficient.

=head2 AlwaysSecure

Determines whether checkout page operations should always be secure.
Set it to the pages that should always be secure, separated by spaces
and/or tabs.

   AlwaysSecure    ord/checkout

=head2 AsciiTrack

A file name to log formatted orders in. Unless preceded by a leading
'/', will be placed relative to the catalog directory. Disabled by
default.

   AsciiTrack     etc/tracking.asc

If a Route is set up to supplant, this is ignored.

=head2 Autoend

Sets an action that is automatically performed at the end every
access. It is performed after any page parsing occurs, just before the
transaction ends. See Autoload.

=head2 Autoload

Sets an action that is automatically performed for every access. It is
performed before any page parsing occurs, and before the action or
page is even determined. Can contain ITL tags or a global subroutine
name. If the return value is true, a normal display of
$CGI->{mv_nextpage} will occur -- if it returns a false (zero, undef,
or blank) value, no page will be processed.

As an example, to remap any mv_nextpage accesses to the private
subdirectory of pages, set:

   Autoload   [perl] $CGI->{mv_nextpage} =~ s:^private/:public/:; [/perl]

=head2 AutoModifier

Sets an attribute in a shopping cart entry to the field of the same
name in the ProductsFile pertaining to this item. This is useful
when doing shipping calculations or other embedded Perl that is based
on item attributes. To set whether an item is defined as "heavy" and
requires truck shipment, set:

   AutoModifier  heavy

When an item is added to the shopping cart using Interchange's
routines, the heavy attribute will be set to the value of the
heavy field in the products database. In the default demo that
would be products. Any changes to ProductFiles would affect
that, of course.

Some values are used by Interchange and are not legal:

       mv_mi
       mv_si
       mv_ib
       group
       code
       quantity
       item

=head2 AutoVariable

Specifies directives which should be translated to Variable settings.
For scalars, the directive name becomes the Variable name and yields
its value, i.e. DescriptionField becomes
__DescriptionField__, which would by default be description.
Array variables have a _N added, where _N is the ordinal index,
i.e. ProductFiles becomes __ProductFiles_0__,
__ProductFiles_1__, etc. Hash variables have a _KEY added,
i.e. SpecialPage becomes __SpecialPage_missing__,
__SpecialPage_violation__, etc. Doesn't handle hash keys that
have non-word characters or whitespace. Only single-level arrays and
hashes are translated properly.

=head2 CommonAdjust

Settings for Interchange pricing. See Chained pricing.

   CommonAdjust    pricing:q2,q5,q10,q25, ;products:price, ==size:pricing

=head2 ConfigDir

The default directory where directive values will be read from when
using the <file notation. Default is config. The name is relative
to the catalog directory unless preceded by a /.

   ConfigDir      variables

This can be changed several times in the catalog.cfg file to pick
up values from more than one directory. Another possibility is to use
a Variable setting to use different templates based on a setting:

   Variable   TEMPLATE   blue

   ParseVariables Yes
   ConfigDir  templates/__TEMPLATE__
   ParseVariables No
   Variable   MENUBAR   <menubar
   Variable   LEFTSIDE  <leftside
   Variable   BOTTOM    <bottom
   ConfigDir config

This will pick the templates/blue template. If TEMPLATE is set to
red, it would read the variables from templates/red.

=head2 CookieDomain

Allows a domain to be set so that multiple servers can handle traffic.
For example, to use server addresses of secure.yourdomain.com and
www.yourdomain.com, set it to:

   CookieDomain    .yourdomain.com

More than one domain can be set. It must have at least two periods or
browsers will ignore it.

=head2 CookieLogin

Allows users to save their username/password (for Vend::UserDB) in a
cookie. Expiration is set by SaveExpire and is renewed each time they
log in. To cause the cookie to be generated originally, the CGI
variable mv_cookie_password or mv_cookie_username must be set.
The former causes both username and password to be saved; the latter
just the username.

   CookieLogin  Yes

Default is No.

=head2 Cookies

Determines whether Interchange will send (and read back) a cookie to
get the session ID for links that go outside the catalog. Allows
arbitrary HREF links to be placed in Interchange pages, while still
saving the contents of the session. The default is Yes.

   Cookies         Yes

If the Cookies directive is enabled, and mv_save_session is set
upon submission of a user form (or in the CGI variables through a Perl
GlobalSub), the cookie will be persistent for the period defined by
SaveExpire.

B<Note: >This should almost always be "Yes."

Caching, timed builds, and static page building will never be in
effect unless this directive is enabled.

=head2 CreditCardAuto

If set to Yes, enables the automatic encryption and saving of credit
card information. In order for this to work properly, the
EncryptProgram directive must be set to properly encode the field.
The best way to set EncryptProgram is with PGP in the ASCII armor
mode. This option uses the following standard fields on Interchange
order processing forms:

=over 4

=item mv_credit_card_number

The actual credit card number, which will be wiped from memory after
checking to see if it is a valid Amex, Visa, MC, or Discover card
number. This variable will never be carried forward in the user
session.

=item mv_credit_card_exp_all

The expiration date, as a text field in the form MM/YY (will take a
four-digit year as well). If it is not present, the fields
mv_credit_card_exp_month and mv_credit_card_exp_year are looked
at. It is set by Interchange when the card validation returns, if not
previously set.

=item mv_credit_card_exp_month

The expiration date month, used if the mv_credit_card_exp_all field
is not present. It is set by Interchange when the card validation
returns, if not previously set.

=item mv_credit_card_exp_year

The expiration date year, used if the mv_credit_card_exp_all field
is not present. It is set by Interchange when the card validation
returns, if not previously set.

=item mv_credit_card_error

Set by Interchange to indicate the error if the card does not validate
properly. The error message is not too enlightening if validation is
the problem.

=item mv_credit_card_force

Set this value to 1 to force Interchange to encrypt the card despite
its idea of validity. Will still set the flag for validity to 0 if the
number/date does not validate. Still won't accept badly formatted
expiration dates.

=item mv_credit_card_separate

Set this value to 1 to cause Interchange encrypt only the card number
and not accompany it with the expiration date and card type.

=item mv_credit_card_info

Set by Interchange to the encrypted card information if the card
validates properly. If PGP is used in ASCII armor mode, this field can
be placed on the order report and embedded in the order email, replete
with markers. This allows a secure order to be read for content,
without exposing the credit card number to risk.

=item mv_credit_card_valid

Set by Interchange to true, or 1, if the the card validates properly.
Set to 0 otherwise.

=back

PGP is recommended as the encryption program, though remember that
U.S. commercial organizations may require a license for RSA.
Interchange will work with GPG, the Gnu Privacy Guard.

   CreditCardAuto     Yes

=head2 CustomShipping

If not blank, causes an error log entry if the shipping file entry is
not found. Not otherwise used for shipping. See SHIPPING for how to
go about doing that.

   CustomShipping      Yes

=head2 Database

Definition of an arbitrary database, in the form "Database database
file type," where "file" is the name of an ASCII file in the same
format as the products database. The file is relative to VendRoot.
Records can be accessed with the [data database field key] tag.
Database names are restricted to the alphanumeric characters
(including the underscore), and it is recommended that they be either
all lower or all upper case. See DATABASES.

   Database      reviews  reviews.txt  CSV

=head2 DatabaseDefault

Defines default parameters for a database. This can be used to set a
default WRITE_CONTROL setting, set a default USER or PASSWORD, etc. It
accepts any scalar setting, which means all B<except>:

ALTERNATE_* BINARY COLUMN_DEF DEFAULT FIELD_ALIAS FILTER_* NAME
NUMERIC POSTCREATE WRITE_CATALOG

This default setting is made when the table is initially defined, i.e.
explicit settings for the database itself override the defaults set.

   DatabaseDefault      WRITE_CONTROL   1
   DatabaseDefault      WRITE_TAGGED    1

This setting must be made *before* the database is defined. To reset
its value to empty, use the Replace directive.

   Replace DatabaseDefault

=head2 DefaultShipping

This sets the default shipping mode by initializing the variable
mv_ship_mode. If not set in catalog.cfg, it is default.

   DefaultShipping     UPS

Somewhat deprecated, the same thing can be achieved with:

   ValuesDefault   mv_shipmode UPS

=head2 DescriptionField

The field that will be accessed with the [item-description]
element.

   DescriptionField    description

Default is description. It is not a fatal error if this field does
not exist. This is especially important for on-the-fly items. If there
is an attribute set to the same name as DescriptionField, this will
be used for display.

=head2 DirConfig

DirConfig allows you to batch-set a bunch of variables from files.
The syntax:

DirConfig  directive-name directory-glob

directive-name is usually Variable, but could be any hash-based
directive. (No other standard directives currently make sense to set
this way.)

directory-glob is a filespec that could encompass multiple
directories. Files are ignored.

The directories are read for file *names* that contain only word
characters, i.e. something that would be a valid Variable. (This alone
might make it not suitable for other uses, but picking up the junk
from the in-directory-backup-file people would be intolerable.)

Then the contents of the file is used to set the variable of the file
name.

The source file name is kept in
$Vend::Cfg->{DirConfig}{Variable}{VARNAME}, for use if
dynamic_variables Pragma is set.

Pragma dynamic_variables enables dynamic updating of variables from
files. Pragma dynamic_variables_files_only restricts dynamic
variables to files only -- otherwise variables are dynamically read
from the VarDatabase definition as well.

With dynamic variables, all @_VARIABLE_@ and __VARIABLE__ settings are
checked first to see if the source file is defined. If there is a key
present, even if its contents are blank, it is returned. Example: in
the case of this catalog.cfg entry:

DirConfig   Variable   templates/foundation/regions

If the file NOLEFT_TOP is present at catalog config time,
__NOLEFT_TOP__ will equal [include
templates/foundation/regions/NOLEFT_TOP].

=head2 DisplayErrors

If the administrator has enabled DisplayErrors globally, setting this
to "Yes" will display the error returned from Interchange in case
something is wrong with embedded Perl programs, tags, or Interchange
itself. Usually, this will be used during development or debugging.
Default is No.

   DisplayErrors       Yes

=head2 DynamicData

When set to one or more Interchange database identifiers, any pages
using data items from the specified database(s) will not be cached or
built statically. This allows dynamic updating of certain arbitrary
databases (even the products database) while still allowing
static/cached page performance gains on pages not using those data
items.

   DynamicData         inventory

Overridden by [tag flag build][/tag], depending on context.

=head2 EncryptProgram

Contains a program command line specification that indicates how an
external encryption program will work. Two placeholders, %p and
%f, are defined, which are replaced at encryption time with the
password and temporary file name respectively. See Order Security.
This is separate from the PGP directive, which enables PGP encryption
of the entire order.

If PGP is the encryption program (Interchange determines this by
searching for the string pgp in the command string), no password
field or file field need be used. The field mv_credit_card_number
will never be written to disk in this case.

   EncryptProgram      /usr/local/bin/pgp -feat sales@company.com

If the order Route method of sending orders is used (default in the
demo), this sets the default value of the encrypt_program
attribute.

=head2 ErrorFile

This is where Interchange will write its runtime errors for THIS
CATALOG ONLY. It can be shared with other catalogs or the main
Interchange error log, but if it is root-based, permission to write
the file is required.

   ErrorFile   /home/interchange/error.log

=head2 ExtraSecure

Disallows access to pages which are marked with AlwaysSecure unless
the browser is in HTTPS mode. A Yes/No directive, the default is 'No.'

   ExtraSecure  Yes

=head2 Filter

Assigns one or more filters (comma separated) to be automatically
applied to a variable.

As an example, multiple form variable submissions on the same page
come back null-separated, like 'value1\0value2\0value3'. To
automatically change those nulls to spaces, you could use this
directive:

 Filter  mail_list  null_to_space

Of course you could just as easily use the regular [filter] tag on the
page if the filter is only going to be used in a few places.

See the ictags document for more information, including a complete
list of filters.

=head2 FormAction

Allows set up of a form action (like the standard ones return,
submit, refresh, etc.). It requires a Perl subroutine as a target:

   FormAction foo <<EOR
   sub {
       $CGI->{mv_nextpage} = 'bar';
   }
   EOR

If it returns a true (non-zero, non-empty) value, Interchange will
display the page defined in $CGI->{mv_nextpage}. Otherwise,
Interchange will not display any page. The default Interchange actions
can be overridden if desired. There is also a global version of this
directive, which is overridden if a catalog-specific action exists.

=head2 FormIgnore

Set to the name(s) of variables that should not be carried in the user
session values. Must match exactly and are case sensitive.

   FormIgnore    mv_searchtype

=head2 FractionalItems

Whether items in the shopping cart should be allowed to be fractional,
i.e., 2.5 or 1.25. Default is No.

   FractionalItems     Yes

=head2 Glimpse

The pathname for the glimpse command, used if glimpse searches
are to be enabled. To use glimpseserver, the -C, -J, and
-K tags must be used.

   Glimpse  /usr/local/bin/glimpse -C -J srch_engine -K2345

=head2 History

How many of the most recent user clicks should be stored in the
session history. Default is 0.

=head2 HTMLsuffix

The file extension that will be seen as a page in the pages
directory. Default is .html.

   HTMLsuffix .htm

=head2 ImageAlias

Aliases for images, ala Apache/NCSA, ScriptAlias, and Alias
directives. Relocates images based in a particular directory to
another for Interchange use; operates after ImageDir. Useful for
editing Interchange pages with an HTML editor. Default is blank.

   ImageAlias  /images/  /thiscatalog/images/

=head2 ImageDir

The directory where all relative IMG and INPUT source file
specifications are based. IT MUST HAVE A TRAILING / TO WORK. If the
images are to be in the DocumentRoot (of the HTTP server or virtual
server) subdirectory images, for example, use the ImageDir
specification '/images/'. This would change SRC="order.gif" to
SRC="/images/order.gif" in IMG and INPUT tags. It has no effect on
other SRC tags.

   ImageDir /images/

Can be set in the Locale settings to allow different image sets for
different locales (MV3.07 and up).

=head2 ImageDirInternal

A value for ImageDir only when the internal HTTP server is in use.
It must have a trailing / to work, and should always begin with a
fully-qualified path starting with http://.

   ImageDirInternal http://www.server.name/images/

=head2 ImageDirSecure

A value for ImageDir only when the pages are being served via
HTTPS. It must have a trailing / to work, and should always begin with
a fully-qualified path starting with http://.

   ImageDirSecure   /secure/images/

This is useful if using separate HTTPS and HTTP servesr, and cannot
make the image directory path heads match.

=head2 Locale

Sets the special locale array. Tries to use POSIX setlocale based
on the value of itself, then tries to accept a custom setting with the
proper definitions of mon_decimal_point, thousands_sep, and
frac_digits, which are the the only international settings
required. Default, if not set, is to use US-English settings.

Example of the custom setting:

   Locale     custom mon_decimal_point , mon_thousands_sep . frac_digits 0

Example of POSIX setlocale for France, if properly aliased:

   Locale     fr

See setlocale(3) for more information. If embedded Perl code is
used to sort search returns, the setlocale() will carry through to
string collation.

See Internationalization.

=head2 LocaleDatabase

Set to the Interchange database identifier of a table that contains
Locale settings. These settings add on to and overwrite any that
are set in the catalog configuration files, including any include
files.

   Database       locale  locale.asc  TAB
   LocaleDatabase locale

=head2 MailOrderTo

Specifies the e-mail address to mail completed orders to.

       MailOrderTo  orders@xyzcorp.com

If 'none' is specified, no e-mailed order will be sent.

=head2 NoCache

The names of Interchange pages that are not to be built statically if
STATIC PAGE BUILDING is in use. If the name is a directory, no pages
in that directory (or any below it) will be cached or built
statically.

   NoCache    ord
   NoCache    special

=head2 NoImport

When set to one or more Interchange database identifiers, those
database(s) will never be subject to import. Useful for SQL databases
or databases that will "never" change.

   NoImport   inventory

=head2 NonTaxableField

The name of the field in the products database that is set (to 1 or
Yes) if an item is not to be taxed. Interchange will log an error and
tax it anyway if the field doesn't exist in the database. Blank by
default, disabling the feature.

   NonTaxableField    wholesale

=head2 NoSearch

Here you can provide one or more filename fragments that will be
matched against the file name used in any attempted search (the
mv_search_file or 'fi' attribute). You may separate multiple match
strings with whitespace, and may include shell-style wildcards.

The default setting is 'userdb', which means that by default you
cannot use Interchange-style searches on the userdb table. (Pure SQL
searches still work with it, however.)

For example, consider this setting:

   NoSearch  userdb  .*  *.secret

In this case any search file with 'userdb' in its name, or beginning
with a dot, or ending in '.secret', will not be searchable.

=head2 OfflineDir

The location of the offline database files for use with the
Interchange offline database build command. Set to "offline" as the
default, and is relative to VendRoot if there is no leading slash.

   OfflineDir          /usr/data/interchange/offline

=head2 OnFly

Enables on-the-fly item additions to the shopping cart. If set to the
name of a valid UserTag, that tag definition will be used to parse and
format the item with the following call:

   $item = Vend::Parse::do_tag($Vend::Cfg->{OnFly},
                                   $code,
                                   $quantity,
                                   $fly[$j],
                               );

$fly[$j] is the value of mv_order_fly for that item. An onfly
tag is provided by Interchange. See <On-the-fly> ordering.

=head2 OrderCounter

The name of the file (relative to catalog root if no leading /) that
maintains the order number counter. If not set, the order will be
assigned a string based on the time of the order and the user's
session number.

   OrderCounter       etc/order.number

Bear in mind that Interchange provides the order number as a
convenience for display, and that no internal functions depend on it.
Custom order number routines may be defined and used without fear of
consequences.

If a Route is set up to supplant and the counter attribute is
set there, this is ignored.

=head2 OrderLineLimit

The number of items that the user is allowed to place in the shopping
cart. Some poorly-mannered robots may "attack" a site by following all
links one after another. Some even ignore any robots.txt file that
may have been created. If one of these bad robots orders several dozen
or more items, the time required to save and restore the shopping cart
from the user session may become excessive.

If the limit is exceeded, the command defined in the Global directive
LockoutCommand will be executed and the shopping cart will be
emptied. The default is 0, disabling the check. Set it to a number
greater than the number of line items a user is ever expected to
order.

   OrderLineLimit   50

=head2 OrderProfile

Allows an unlimited number of profiles to be set up, specifying
complex checks to be performed at each of the steps in the checkout
process. The files specified can be located anywhere. If relative
paths are used, they are relative to the catalog root directory.

   OrderProfile    etc/profiles.order etc/profiles.login

The actions defined here are also used for mv_click actions if
there is no action defined in scratch space. They are accessed by
setting the mv_order_profile variable to the name of the order
profile. Multiple profiles can reside in the same file, if separated
by __END__ tokens, which must be on a line by themselves.

The profile is named by placing a name following a __NAME__ pragma:

 __NAME__ billing

The __NAME__ must begin the line, and be followed by whitespace and
the name. The search profile can then be accessed by
<mv_order_profile="billing">. See Advanced Multi-level Order Pages.

=head2 OrderReport

The location of the simple order report file. Defaults to etc/report.

   OrderReport          /data/order-form

=head2 PageDir

Location of catalog pages. Defaults to the pages subdirectory in the
VendRoot directory.

   PageDir    /data/catalog/pages

Can be set in the Locale settings to allow different page sets for
different locales.

=head2 PageSelectField

Sets a products database column which can be used to select the
on-the-fly template page. This allows multiple on-the-fly pages to be
defined. If the field is empty (no spaces), the default flypage
will be used.

   PageSelectField    display_page

=head2 ParseVariables

Determines whether global and catalog variables will be parsed in the
configuration file. Default is No. The foundation catalog.cfg turns
ParseVariables on and usually expects it to be on.

   Variable STORE_ID  topshop
   ParseVariables Yes
   StaticDir  /home/__STORE_ID__/www/cat
   ParseVariables No

=head2 Password

The encrypted or unencrypted password (depending on Variable
MV_NO_CRYPT) that will cause internal authorization checks for
RemoteUser to allow access.

Below is the encrypted setting for a blank password.

   Password                bAWoVkuzphOX.

=head2 PGP

If credit card information is to be accepted, and the e-mailed order
will go over an insecure network to reach its destination, PGP
security should be used. The key ring to be used must be for the user
that is running the Interchange server, or defined by the environment
variable PGPPATH, and the key user specified must have a key on the
public key ring of that user.

   PGP        /usr/local/bin/pgp -feat orders@company.com

If this directive is non-null, the PGP command string as specified
will be used to encrypt the entire order in addition to any encryption
done as a result if CreditCardAuto. If, for some reason, an error
comes from PGP, the customer will be given the special page failed.

If a Route is set up to supplant, this is ignored.

=head2 Pragma

Sets the default value of an Interchange pragma. The directive is set
like this:

   Pragma my_pragma_name

To enable a pragma for only a particular page, set it anywhere in the
page:

   [pragma my_pragma_name]

To disable a pragma for a particular page, set it anywhere in the
page:

   [pragma my_pragma_name 0]

Descriptions of each pragma follow.

=over 4

=item dynamic_variables

=item dynamic_variables_file_only

=item no_html_parse

=back

Disallows HTML tag parsing. This is a B<big> parser performance gain
and is enabled in the demo catalog.

When this pragma is set, you can't encapsulate Interchange tags inside
HTML tags like this:

   <P MV="if scratch something"> ... </P>

Note that a page with no HTML parsing is a good place to put a DTD
(document type descriptor).

=over 4

=item no_image_rewrite

=back

Prevents image locations in pages from being altered by Interchange.
Added in Interchange 4.7.0.

Interchange normally rewrites image locations to point to ImageDir.
This applies to image locations mentioned in <img src="...">, <input
src="...">, <body background="...">, <table background="...">, and
<tr/th/td background="...">.

When this pragma is B<not> set, the following tag:

   <img src="fancy.gif">

Would, assuming an ImageDir set to /foundation/images, be transformed
into:

   <img src="/foundation/images/fancy.gif">

When pragma no_image_rewrite B<is> set, the <img> tag would remain
unchanged.

=over 4

=item safe_data

=back

By default Interchange does not allow data returned from databases to
be reparsed for Interchange tags. Setting the safe_data pragma
eliminates this restriction.

If for some reason you want to have tags in your database, for
example, to use [page ...] for catalog-internal hyperlinks in your
product descriptions, you need to enable safe_data. Some things to
consider:

=over 4

=item 1.

It may be better to use the safe_data attribute available to certain
tags instead of the pragma, or perhaps to use [pragma] for a whole
page or [tag pragma] ... [/tag] for a small block, instead of a
catalog-wide Pragma directive.

=item 2.

In any case it is strongly recommended that you surround the area with
[restrict] ... [/restrict] tags to allow only the specific (hopefully
relatively safe) set of tags you expect to appear, such as [page] or
[area]. Expect security compromises if you allow [calc] or [perl], or
other extremely powerful tags.

=item 3.

Be certain that you know everywhere the data in your database will be
used. Will it always be possible to reparse for tags? What about when
it's used to create an emailed plain-text receipt -- will a literal
'[page ...]' tag show up in the product description on the receipt?
Would the desired output of '<a href="...">' be any better in a
plaintext situation? What if you access your database from
applications other than Interchange? You'll then have to decide what
to do with such tags; perhaps you can simply strip them, but will the
missing tag output cause you any trouble?

=back

In short, safe_data is disabled by default for a reason, and you
should be very careful if you decide to enable it.

(Watch out for parse order with [tag pragma] or [restrict] when used
with lists that retrieve data from the database, as in [prefix-*] and
the flypage. Loops parse before regular tags like [tag] and
[restrict], and thus aren't affected by it.)

=over 4

=item strip_white

=back

Set this to strip whitespace from the tops of HTML pages output by
Interchange. Such whitespace usually comes from Interchange tags at
the top of the page. The pragma's purpose is mostly to make 'view
source' in the browser a slightly more tolerable experience.

Default is off; whitespace is unchanged.

=head2 PriceCommas

If no commas are desired in price numbers (for the [item-price]
tag), set this to No. The default is to use commas (or whatever is
the thousands separator for a locale).

   PriceCommas         no

This is overridden if a Locale price_picture is set.

=head2 PriceDivide

The number the price should be divided by to get the price in units
(dollars or such). The default is one. If penny pricing is used, set
it to 100.

   PriceDivide         100

Can be set in the Locale settings to allow a price adjustment
factor for different currencies.

=head2 PriceField

The field in the product database that will be accessed with the
[item-price] element. Default is "price."

   PriceField          ProductPrice

Can be set in the Locale settings to allow different price fields
for different currencies.

=head2 ProductDir

Location of the database files. Defaults to the products subdirectory
of the VendRoot directory. May not be set to an absolute directory
unless NoAbsolute is defined as No.

   ProductDir          /data/catalog/for-sale

Most people never set this directive and use the default of
products.

=head2 ProductFiles

Database tables that should be seen as the "products" database.

   ProductFiles    vendor_a vendor_b

The key thing about this is that each will be searched in sequence for
a product code to order or an [item-field ....] or [loop-field
...] to insert. The main difference between [item-field ....] and
[item-data table ...] is this fall-through behavior.

Default is products.

=head2 ReadPermission and WritePermission

By default, only the user account that Interchange runs under (as set
by the SETUID permission on vlink) can read and write files created by
Interchange. WritePermission and ReadPermission can be set to
user, group, or 'world'.

   ReadPermission      group
   WritePermission     group

=head2 RemoteUser

The value of the HTTP environment variable REMOTE_USER that will
enable catalog reconfiguration. HTTP basic authentication must be
enabled for this to work. Default is blank, disabling this check.

   RemoteUser   interchange

=head2 Replace

Causes a directive to be emptied and re-set (to its default if no
value is specified). Useful for directives that add to the value by
default.

   Replace NoCache ord special multi reconfig query

Capitalization must be exact on each directive.

=head2 Require

Forces a Perl module, global UserTag, or GlobalSub to be present
before the catalog will configure. This is useful when transporting
catalogs to make sure they will have all needed facilities.

   Require usertag   email
   Require globalsub form_mail
   Require module    Business::UPS

=head2 RobotLimit

The RobotLimit directive defines the number of consecutive pages a
user session may access without a 30 second pause. If the limit is
exceeded, the command defined in the Global directive
LockoutCommand will be executed and catalog URLs will be rewritten
with host 127.0.0.1, sending the robot back to itself. The default is
0, disabling the check.

   RobotLimit  200

=head2 Route

Sets up order routes. See Custom Order Routing. There are examples
in the demo simple.

=head2 SalesTax

If non-blank, enables automatic addition of sales tax based on the
order form. The value is one of three types of values:

=over 4

=item multi

The special value "multi" enables table-based lookup of taxing rates
based on the value of user form values, by default country and
state.

=item [itl-tags]

If the value has a left square bracket, it is interpolated for ITL
tags and the result used as the amount of the salestax.

=item var1, var2

A comma-separated list of the field names (as placed in the checkout
page, for example ord/checkout.html) in priority order. These are be
used to look up sales tax percentage in the salestax.asc ASCII
table. (This table is not supplied with Interchange.)

   SalesTax            zip state

=back

=head2 SalesTaxFunction

A Perl subroutine that will return a hash reference with the sales tax
settings. This can be used to query a database for the tax for a
particular vendor:

   SalesTaxFunction  <<EOR
         my $vendor_id = $Session->{source};
       my $tax = $TextSearch->hash( {
                           se => $vendor_id,
                           fi => 'salestax.asc',
                           sf => 'vendor_code',
                           ml => 1000,
                           } );
       $tax = {} if ! $tax;
       $tax->{DEFAULT} = 0.0;
       return $tax;
   EOR

or simply produce a table:

   SalesTaxFunction  <<EOR
    return {
        DEFAULT => 0.0,
        IL => 0.075,
        OH => 0.065,
    };
EOR

A DEFAULT value must always be returned or the function will be
ignored.

=head2 SaveExpire

The default amount of time that a cookie will be valid (other than the
MV_SESSION_ID cookie). The ones used in Interchange by default are
MV_USERNAME and MV_PASSWORD for the CookieLogin feature.
Specified the same as SessionExpire, with an integer number
followed by one of minutes, hours, days, or weeks.

   SaveExpire 52 weeks

Default is 30 days.

=head2 ScratchDefault

The default scratch variable settings that the user will start with
when their session is initialized. To disable placing URL rewrite
strings after the user has given a cookie, set:

   ScratchDefault  mv_no_session_id  1
   ScratchDefault  mv_no_count       1
   ScratchDefault  mv_add_dot_html   1

=head2 ScratchDir

The directory where temporary files will be written, notably cached
searches and retired session IDs. Defaults to tmp in the catalog
directory.

   ScratchDir          /tmp

=head2 SearchProfile

Allows an unlimited number of search profiles to be set up, specifying
complex searches based on a single click. The directive accepts a file
name based in the catalog directory if the path is relative:

   SearchProfile    etc/search.profiles

As an added measure of control, the specification is evaluated with
the special Interchange tag syntax to provide conditional setting of
search parameters. The following file specifies a dictionary-based
search in the file 'dict.product':

 __NAME__ dict_search
 mv_search_file=dict.product
 mv_return_fields=1
 [if value fast_search]
   mv_dict_limit=-1
   mv_last=1
 [/if]
 __END__

The __NAME__ is the value to be specified in the mv_profile
variable on the search form, as in

 <INPUT TYPE=hidden NAME=mv_profile VALUE="dict_search">

or with mp=profile in the one-click search.

 [page scan se=Renaissance/mp=dict_search]Renaissance Art[/page]

Multiple profiles can reside in the same file, if separated by
__END__ tokens. __NAME__ tokens should be left-aligned, and
__END__ must be on a line by itself with no leading or trailing
whitespace.

=head2 SecureURL

The base URL for secure forms/page transmissions. Normally it is the
same as VendURL except for the https: protocol definition. Default
is blank, disabling secure access.

   SecureURL   https://machine.com/xyzcorp/cgi-bin/vlink

=head2 SendMailProgram

The location of the sendmail binary, needed for mailing orders. Must
be found at startup. This often needs to be set for FreeBSD or BSDI.

  SendMailProgram    /usr/sbin/sendmail

If set to none, no mail can be sent by standard Interchange
facilities. The default is the value in interchange.cfg and varies
depending on operating system.

=head2 SeparateItems

Changes the default when ordering an item via Interchange to allowing
multiple lines on the order form for each item. The default, No,
puts all orders with the same part number on the same line.

Setting SeparateItems to Yes allows the item attributes to be
easily set for different instances of the same part number, allowing
easy setting of things such as size or color.

   SeparateItems       Yes

Can be overridden with the mv_separate_items variables (both
scratch and values).

=head2 SessionDatabase

When storing sessions, specify the name of the directory or DBM file
to use. The file extensions of .db or .gdbm (depending on the DBM
implementation used) will be appended. If the default file-based
sessions are used, it is the name of the directory.

   SessionDatabase     session-data

Can be an absolute path name, if desired.

It is possible for multiple catalogs to share the same session file,
as well as for multiple Interchange servers to serve the same
catalogs. If serving a extremely busy store, multiple parallel
Interchange servers can share the same NFS-based file system and serve
users in a "ping-pong" fashion using the file-based sessions. On huge
systems, the level of directory hashing may be changed. By default,
only 48 * 48 hashing is done. See the source for SessionFile.pm.

=head2 SessionDB

The name of the Interchange database to be used for sessions if DBI is
specified as the session type. This is not recommended.

=head2 SessionExpire

A customer can exit the browser or leave the catalog pages at any
time, and no indication is given to the web server aside from the lack
of further requests that have the same session ID. Old session
information needs to be periodically expired. The SessionExpire
specifies the minimum time to keep track of session information.
Defaults to one day. Format is an integer number, followed by
s(econds), m(inutes), h(ours), d(ays), or w(eeks).

   SessionExpire       20 minutes

If CookieLogin is in use, this can be a small value. If the
customer's browser has the Interchange session cookie stored, he/she
will be automatically logged back in with the next request. Note,
however, that the customer's cart and session values will be reset.

=head2 SessionLockFile

The file to use for locking coordination of the sessions.

   SessionLockFile     session-data.lock

This only applies when using DBM-based sessions. It is possible for
multiple catalogs to share the same session file. SessionDatabase
needs to be set appropriately if the database is to be shared.
Defaults to session.lock, which is appropriate for separate session
files (and therefore standalone catalogs). Can be an absolute path
name, if desired.

=head2 SessionType

The type of session management to be used. Use one of the following:

   DB_File     Berkeley DB
   DBI         DBI (don't use this, normally)
   File        File-based sessions (the default)
   NFS         File-based sessions, forces use of fcntl locking
   GDBM        GDBM

The default is file-based sessions, which provides the best
performance and reliablility in most environments.

If you are planning on running Interchange servers with an NFS-mounted
filesystem as the session target, you must set SessionType to "NFS".
The other requisites are usually:

1. fcntl() supported in Perl 2. lock daemon running on NFS server
system 3. lock daemon running on Interchange server

See also the global directive LockType.

=head2 SpecialPage

Sets a special page to other than its default value. Can be set as
many times as necessary. Will have no effect if not one of the
Interchange Required Pages.

   SpecialPage         checkout ord/checkout
   SpecialPage         failed special/error_on_order
   SpecialPage         interact special/browser_problem
   SpecialPage         noproduct special/no_product_found
   SpecialPage         order  ord/basket
   SpecialPage         search srch/results

=head2 SpecialPageDir

The directory where special pages are kept. Defaults to
special_pages in the catalog directory.

   SpecialPageDir      pages/special

=head2 Static

A Yes/No directive. Enables static page building and display features.
Default is No.

    Static   Yes

=head2 StaticAll

A Yes/No directive. Tells Interchange to try and build all pages in
the catalog statically when called with the static page build option.
This is subject to the settings of StaticFly, StaticPath, and
NoCache. Default is No. Pages that have dynamic elements will not
be built statically, though that may be overridden with [tag flag
build][/tag] on the page in question.

    StaticAll   Yes

=head2 StaticDepth

The number of levels of static search building that will be done if a
search results page contains a search. Default is one, though it could
be very long if set higher. Set to 0 to disable re-scanning of search
results pages.

    StaticDepth 2

=head2 StaticDir

The absolute path of the directory which should be used as the root
for static pages. The user ID executing Interchange must have write
permission on the directory (and all files within) if this is to work.

    StaticDir   /home/you/www/catalog

=head2 StaticFly

A Yes/No directive. If set to Yes, static builds will attempt to
generate a page for every part number in the database using the
on-the-fly page build capability. If pages are already present with
those names, they will be overwritten. The default is No.

    StaticFly   Yes

=head2 StaticPage

Tells Interchange to build the named page (or pages, whitespace
separated) when employing the static page-building capability of
Interchange. Not necessary if using StaticAll.

    StaticPage   info/about_us  info/terms_and_conditions

=head2 StaticPath

The path (relative to HTTP document root) which should be used in
pages built with the static page-building capability of Interchange.

    StaticPath    /catalog

=head2 StaticPattern

A perl regular expression which is used to qualify pages that are to
be built statically. The default is blank, which means all pages
qualify.

    StaticPattern  ^info|^help

=head2 StaticSuffix

The extension to be appended to a normal Interchange page name when
building statically. Default is .html. Also affects the name of
pages in the Interchange page directory. If set to .htm, the pages
must be named with that extension.

    StaticSuffix   .htm

=head2 Sub

Defines a catalog subroutine for use by the [perl][/perl] or
[mvasp] embedded perl languages. Use the "here document" capability of
Interchange configuration files to make it easy to define:

   Sub <<EOF
   sub sort_cart_by_quantity {
       my($items) = @_;
       $items = $Items if ! $items;
       my $out = '<TABLE BORDER=1>';
       @$items = sort { $a->{quantity} <=> $b->{quantity} } @$items;
       foreach $item (@$items) {
           my $code = $item->{code};
           $out .= '<TR><TD>';
           $out .= $code;
           $out .= '</TD><TD>';
           $out .= $Tag->data('products', 'name', $code);
           $out .= '</TD><TD>';
           $out .= $Tag->data('products', 'price', $code);
           $out .= '</TD></TR>';
       }
       $out .= '&lt/TABLE>';
       return $out;
   }
   EOF

As with Perl "here documents," the EOF (or other end marker) must be
the ONLY thing on the line, with no leading or trailing white space.
Do not append a semicolon to the marker. The above would be called
with:

   [perl]
       my $cart = $Carts->{main};
       return sort_cart($cart);
   [/perl]

and will display an HTML table of the items in the current shopping
cart, sorted by the quantity. Syntax errors will be reported at
catalog startup time.

Catalog subroutines may not perform unsafe operations. The Safe.pm
module enforces this unless global operations are allowed for the
catalog. See AllowGlobal.

=head2 Suggests

Generates a warning message when a Perl module, global UserTag, or
GlobalSub is not present at catalog configuration time. Same as the
Require directive except not fatal.

   Suggest usertag   table_editor
   Suggest globalsub file_info
   Suggest module    Business::UPS

=head2 TableRestrict

Used to provide "views" in database-based searches. Does not affect
the text searches. Affects the table being searched.

Takes the form of field=session_param, where field is a column
in the table being iterated over, and session_param is a
$Session key (i.e., [data session username]).

   TableRestrict  products  owner=username

The above would prevent the database search from returning any records
except those where the column owner contains the current value of
[data session username].

Probably most usefully set by embedded Perl code in certain
situations. For example:

   [calc]
       # Restrict edit to owned fields
       $Config->{TableRestrict}{products} = 'owner=username';
       return;
   [/calc]

When using SQL-based databases, in effect it turns the base search
query

   select * from products

into

   select * from products where owner = '[data session username]'

Interchange databases are similarly affected, though the methodology
is different. Also may be useful in "mall" situations, where user is
allowed to only see products from the current store ID.

=head2 TaxShipping

A comma or space-separated list of states or jurisdictions that tax
shipping cost, i.e., UT. Blank by default, never taxing shipping.

   TaxShipping         UT,NV,94024

=head2 TrackFile

Name of a logfile that tracks user traffic. This is used in the back
office administration report on traffic by affiliate.

The default is that no such file is kept.

=head2 UpsZoneFile

The file containing the UPS zone information, specified relative to
the catalog directory unless it begins with a /. It can be in the
format distributed by UPS or can be in a tab-delimited format, with
the three-letter zip prefix of the customer used to determine the
zone. It interpolates based on the value in mv_shipmode. A user
database named the same as the mv_shipmode variable must be present or
the lookup will return zero.

IMPORTANT NOTE: Zone information and updated pricing from UPS must be
obtained in order for this to work properly. The zone information is
specific to a region!

   UpsZoneFile         /usr/interchange/data/ups_zone.asc

=head2 UseModifier

Determines whether any attributes, the modifiers specified in the
directive, can be attached to the item. See Item Attributes. The
default is no modifier. Don't use a value of quantity or this
directive will not work properly.

   UseModifier         size,color

Some values are used by Interchange and are not legal:

       mv_mi
       mv_si
       mv_ib
       group
       code
       quantity
       item

=head2 ValuesDefault

Sets the initial state of the user values, i.e., [value key] or
$Values->{key}.

   ValuesDefault   fname  New
   ValuesDefault   lname  User

When the user session starts, [value fname] [value lname] will be
"New User."

=head2 Variable

Defines a catalog variable that will be available in the current
catalog with the notation __Variable__. Variable identifiers must
begin with a capital letter, and can contain only word characters
(B<A-Z,a-z,0-9> and underscore). These are substituted second (right
after global Variables) in any Interchange page, and can contain any
valid Interchange tags except global variables.

   Variable   DOCUMENT_ROOT   /usr/local/etc/httpd/htdocs

=head2 VariableDatabase

The name of a database containing a field Variable which will be used
to set Interchange variable values. For example, a database defined
as:

   Database  var var.txt TAB
   VariableDatabase var

and containing

   code    Variable
   HELLO   Hi!

would cause __HELLO__ to appear as Hi!.

The field name is case-sensitive, and variable would not work.

The values are inserted at time of definition. Any single-level
hash-oriented Interchange directive, such as SpecialPage,
ScratchDefault, or ValuesDefault, can be set in the same way. If
the VariableDatabase named does not exist at definition time, a
database of the default type with an ASCII file source appending
.txt is assumed. In other words:

   VariableDatabase variable

is equivalent to

   Database         variable variable.txt TAB
   VariableDatabase variable

=head2 VendURL

Specifies the base URL that will run vlink as a cgi-bin program.

       VendURL  http://machine.company.com/cgi-bin/vlink

=head2 WideOpen

Disables IP qualification of user sessions. B<This degrades catalog
security.> Do not use unless using encryption or a real-time payment
gateway.

 ________________________________________

Copyright 2001 Red Hat, Inc. Freely redistributable under terms of the
GNU General Public License.