Note: If you are not a system administrator, you will not be able to perform the installation as described below. |
The configuration directives or environmental variables, provide Miva Merchant Empresa with startup information. The primary purpose is to set the global operating environment; file locations, buffer settings, security settings, among others. These instructions are intended for the System Administrator.
There are two configurations:
the 4.x configuration with new functionality and directives, which uses the configuration library env.so
the 3.x configuration provides compatibility with the 3.9x Miva Merchant Empresa configuration file, and uses the configuration library 3x.so.
The path to either of these configuration libraries may be set in httpd.conf, or the library may be renamed to libmivaconfig.so and placed in the current directory (usually where the Miva Merchant binary resides).
Advanced users may also develop their own configuration libraries, which is beyond the scope of this document.
The following Environmental Variables are used only when the 4.x Configuration Library, env.so, is used. Enter the variables you require as you would other Environmental Variables in the httpd.conf (or srm.conf). For example:
SetEnv MvCONFIG_Var_Name /path or value
These variables can also be entered into other server configuration files, such as htaccess and bashrc.
Note: The directives (variables) are usually entered into httpd. However, you can also enter the variables into the .bashrc, .profile, or .cshrc. Remember to modify the syntax accordingly. |
The allocated buffer size when acting on the MivaScript tag, MvCALL, reading data. (The Virtual Machine emulates a browser using HTTP protocol to contact a remote host.)
value format: bytes, default 8192 bytes
The allocated buffer size MvCALL uses for uploading a file to the remote server.
When reading files associated with the MivaScript <MvIMPORT> tag, Miva Merchant Empresa VM allocates a buffer for the incoming data. This allows you to tune the performance of Miva Merchant Empresa VM import processing to optimize data read performance. (Reasonable numbers less than 100000 are a good idea on most systems and smaller numbers, such as 10000, should be used on heavily loaded systems without a lot of RAM.)
value format: bytes, default is 8192
The allocate buffer size is used for output. Multiple buffers are created and, unless BUFSZ_OUTPUT_FLUSH is used, all output is buffered and output at the end of execution (so content-length can be calculated).
value format: bytes, default is 8192
The allocated buffer size the MivaScript tag MvSMTP uses when writing to the SMTP mail server.
Miva Merchant Empresa allocates a buffer for active documents and attempts to load as much of the active document in the buffer as it can before processing.
value format: bytes, default is 8,192
The output_flush specifies how many bytes are in the output when an output (and output the HTTP headers, if necessary) is done; flush occurs when the output buffers reach the value set for the flush. (See MvCONFIG_BUFSZ_OUTPUT.)
value format: bytes, default is 1048576 (1MB)
<method> is the commerce method that corresponds to the specific commerce service that is installed in the Miva Merchant Empresa VM commerce directory. For example, the entry in your httpd.conf would be similar to the following:
MvCONFIG_COMMERCE_MethodName /home/user/lib/commerce/library.so
value: the full path to the library file
This value is available to Miva Merchant Empresa VM active documents in the Collared system variable.
Note: Cookies must be enabled for Miva Merchant use. |
Determines the directory in which Miva Merchant Empresa VM looks for a database library. <type> is the database type.
The file name of the default active document name, if no name is specified on the URL command line. This is usually set to "index.mvc" (".mvc" is the usual Miva Merchant Empresa VM suffix for active document names).
Specify a file delay for use with an operation which requires looping for guaranteed completion, such as finishing an MvLOCKFILE block. Or, to prevent infinite loops when MvCONFIG_TIMEOUT_GLOBAL (globaltimeout) is set to zero.
Identifies the path in which the Miva Merchant Empresa VM looks for the built-in libraries.
Determines the directory in which Miva Merchant Empresa VM looks for the SSL certificate files.
Identifies the location of the directory that corresponds to a specific commerce service that require a data directory in the Miva Merchant data directory.
The full path of the data directory.
Determines the directory in which Miva Merchant Empresa VM looks for the documents it will execute (active documents). (Use an absolute path for mivaroot). This can be overridden with the ~login directive on the URL command line only when the MvCONFIG_DIR_USER is also set.
MvCONFIG_DIR_MIVA /home/mivauser/public_html
If MvCONFIG_DIR_MIVA is /sites/sitename/public_html, and the URL is http://mivasite.com/cgi-bin/miva?/diag.mvc, the Miva Merchant Engine will look for the file in the directory assigned by this MvCONFIG_DIR_MIVA (.../public_html). If the URL is http://mivasite.com/cgi-bin/miva?/subdirectory/file.mvc, Miva Merchant Empresa VM will look for the file in the subdirectory of the path set (.../public_html/subdirectory).
Location for the temporary files used during an MvPack. This is particularly useful when using NFS.
One type of URL Miva Merchant Empresa VM executes, when it refers to a script file that is stored in a user's private HTML directory; the defined value is appended to the user's home directory, and takes the form: http://www.mivasite.com/~mivauser/script.mvc. Miva Merchant Empresa VM looks for the script file in the directory defined by this directive. (Typically, it will be defined to be the same as the UserDir of the Web server.)
Authorizes all users (except root) to use MivaScript applications. If the value starts with slash (/), then it is assumed to be an absolute path, and no other checking is done. If it does not start with a slash, the directory is appended to the user's home directory.
The numeric value given to this variable allows you to enable configurations that may not be secure under all circumstances. The default value of 0 (zero) specifies that under no circumstances, will Miva Merchant Empresa VM be allowed to follow symbolic links from source code or data directories. A value of 0 (zero) here also disallows Miva Merchant Empresa VM from following an absolute path, that may be specified in an application, to read or write data.
Value |
Description |
0 |
Do not allow Miva Merchant Empresa VM to follow symbolic links or an absolute path (default) |
1 |
Follow symbolic links in the source code directory. |
2 |
Ignore symbolic link ownership in the source code directory. |
4 |
Follow symbolic links in the data directory. |
8 |
Ignore symbolic link ownership in the data directory. |
16 |
Allow absolute paths for data files. |
Working as a bitmask, you can combine the values to allow combinations of different options. For example, the following option would allow Miva Merchant Empresa VM to ignore symbolic link ownership in the source code directory (2), and follow symbolic links in the data directory (4).
Set this variable to the email address to be shown when Miva Merchant Empresa VM encounters a system configuration or authorization error, or cannot find the specified active document.
The full path and filename of the configuration library, such as env.so or custom ones.
Identifies the number of seconds old a lockfile must be before it is considered expired and is removed. This prevents stale lockfiles from causing subsequent processes to timeout waiting for a lock.
Controls the host name that is written to the lockfile. Used if there are multiple hosts writing lockfiles to the same directory, which is possible if using NFS or some other fileserver. Each system must have a unique value for lockhostname (which almost always occurs, since the network hostnames will be different).
When set to a value greater than 0, controls the maximum number of MvDO files that will be cached. This option is similar to the maxfiles configuration option. Some servers may need a value of 25.
When set to a value greater than 0, this directive will control the maximum number of file handles opened by the engine (not including the handle for the executable file itself, standard input, standard output, and standard error). Scripts that need to access more than "maxfiles" files simultaneously will still execute, because the engine will create virtual file handles.
The directory in which the SSL file, libssl.so, resides.
The directory in which the SSL file, libcrypto.so, resides.
During a call operation (MvCALL), Miva Merchant Empresa VM opens a TCP/IP port to a Web host. This option sets the number of seconds that Miva Merchant Empresa VM will wait for communication from the remote host.
Specify a file timeout to prevent infinite loops when globaltimeout is set to zero. Or, with an operation which requires looping for guaranteed completion, such as finishing an MvLOCKFILE block.
When Miva Merchant Empresa VM has completed processing the information in the global configuration file and begins to execute an active document, it sets a global timer for the number of seconds specified by this variable. After the set number of seconds has elapsed, Miva Merchant Empresa VM, closes all files, and terminates. This helps in preventing processes from running too long. Miva Merchant Empresa VM's default value is 90 seconds and can be overridden by setting this variable. Set this variable to 0 if you would like no global time-out to be set.
During sending and receiving mail operations, Miva Merchant Empresa VM opens a TCP/IP port to the SMTP or POP3 host. This variable sets the number of seconds Miva Merchant Empresa VM will wait for communication from the remote host.
These 3x.so directives for the Virtual Machine are either new for use with the VM or were previously undocumented. Enter them into the mivavm.conf, as you require for your server setup.
The general format for a configuration option is:
configuration option=value
The allocated buffer size when acting on an MvCALL, where the Virtual Machine emulates a browser using HTTP protocol to contact a remote host and send and/or receive data.
The allocated buffer size MvCALL uses for sending data to the remote server.
The allocated buffer size the MivaScript tag MvSMTP uses when writing to the SMTP mail server.
Changes the priority that MivaScript runs under UNIX. Values below 0 indicate a priority higher than normal; values under 0 indicate a priority lower than normal.
Location for the files that are temporarily created by Miva Merchant Empresa.
These new tags are used in the 3x.so library with the Miva Merchant Empresa Virtual Machine. They are not valid for the 3.x Miva Merchant Empresa Engine.
Set the full path to each built-in function library.
<BUILTIN-LIB LIBRARY = "/usr/local/miva/lib/builtins/string.so">
Register each database library type and its full path.
Note: If you are not using Apache, you will need to consult your Web server's documentation for information on setting up redirection. |
Apache suexec is a CGI wrapper program that enables the Web server to run CGI programs as a specific user.
To use Miva Merchant Empresa VM under Apache suexec, you will need to install a separate copy of the Miva Merchant Empresa VM binary in each user's private cgi-bin. Each binary should be owned by the owner of the cgi-bin directory. To ease the administration process, you may configure these binaries to share common configuration files.
Note: Set the following commands:
chmod 755 mivavm
chown <cgi-bin Directory Owner> mivavm
The following list shows the 3.x Miva Merchant Empresa Engine directive and its equivalent 4.x directive for the Virtual Machine.
3.x ENGINE Directive |
4.x VIRTUAL MACHINE Directive |
callbuffersize |
MvCONFIG_BUFSZ_CALL |
contentbuffersize |
MvCONFIG_BUFSZ_CONTENT |
n/a |
MvCONFIG_BUFSZ_OUTPUT |
smtpbuffersize |
MvCONFIG_BUFSZ_SMTP |
|
|
authfile |
3x.so only |
authuserdir |
MvCONFIG_DIR_USERDATA |
cadir |
MvCONFIG_DIR_CA |
stmodedatadir |
MvCONFIG_DIR_DATA |
calltimeout |
MvCONFIG_TIMEOUT_CALL |
commercedir |
MvCONFIG_DIR_COMMERCE |
defaultmacroencoding |
n/a |
n/a |
MvCONFIG_DATABASE_<method> |
|
|
(<DATABASE-LIB METHOD="type" LIBRARY="path"> in 3x.so) |
|
dnslookup |
3x.so only |
filetimeout |
MvCONFIG_TIMEOUT_FILE |
filedelay |
MvCONFIG_DELAY_FILE |
globaltimeout |
MvCONFIG_TIMEOUT_GLOBAL |
importbuffersize |
MvCONFIG_BUFSZ_IMPORT |
lockexpiration |
MvCONFIG_LOCK_EXPIRATION |
|
|
lockhostname |
MvCONFIG_LOCK_HOSTNAME |
logfile |
n/a |
loglevel |
n/a |
mailtimeout |
MvCONFIG_TIMEOUT_MAIL |
n/a |
MvCONFIG_MAX_DOCACHE (maxdocache in 3x.so) |
maxfiles |
MvCONFIG_MAX_FILES |
maxfunctiondepth |
n/a |
mivadefault |
MvCONFIG_DEFAULT_FILE |
mivaroot |
MvCONFIG_DIR_MIVA |
|
|
nice |
3x.so only. See Note Below |
openssl |
MvCONFIG_SSL_OPENSSL |
openssl_crypto |
MvCONFIG_SSL_CRYPTO |
packages |
n/a |
redirectonly |
3x.so only |
securityoptions |
MvCONFIG_FLAGS_SECURITY |
serveruserid |
3x.so only |
|
|
sitevars |
3x.so only |
serveradmin |
MvCONFIG_INFO_SERVERADMIN |
stmodedatadir |
3x.so only |
tempdir |
MvCONFIG_DIR_TEMP |
templatebuffersize |
MvCONFIG_BUFSZ_TEMPLATE |
usecookies |
MvCONFIG_COOKIES |
userdir |
MvCONFIG_DIR_USER |
usersitevars |
3x.so only |
validextensions |
3x.so only |
|
|
virtualhostvariable |
3x.so only |
workdir |
n/a |
n/a |
MvCONFIG_DIR_BUILTIN |
(BUILTIN-LIB LIBRARY="path" in 3x.so) |
|
n/a |
MvCONFIG_DATABASE_<method> |
(<DATABASE-LIB METHOD="type" LIBRARY="path"> in 3x.so) |
|
n/a |
MvCONFIG_LIBRARY |
Note: nice changes the priority that MivaScript runs under UNIX. Valid values are -20 to + 20. Values below 0 indicate a priority higher than normal; values over 0 indicate a priority lower than normal. |
These are tags in the 3.x Miva Merchant Empresa Engine, and a directive (or configuration variable) in 4.x Miva Merchant Empresa Virtual Machine.
3.x Tag 4.x Directive
<COMMERCE-LIB> MvCONFIG_COMMERCE_<method>
MvCONFIG_DIR_COMMERCE
<PACKAGE> n/a
<virtualhost> Apache Env Variable <Virtual Host>
To emulate the 3.x virtual host, enter the required Environmental Variables (SetEnv) inside the Apache <VirtualHost> block in httpd.conf.
The Miva Merchant Virtual Machine supports compiled MivaScript, including Miva Merchant 4.14 and above. Some of the following Miva Merchant (4.14 and above) modules use a Commerce Library, OpenSSL, or neither, as indicated in the "Method or OpenSSL" column.
Module
|
Method or OpenSSL
|
Library(1)
|
---|---|---|
Authorize.Net Payment Services
|
AuthorizeNet
and OpenSSL |
authnet-vx.xx-platform.so
|
Cardservice/LinkPoint
|
LinkPoint
|
linkpoint--vx.xx-platform.so
|
CertiTAX
|
CertiTAX
|
Obtain from vendor.
|
CyberCash Payment Services
( to maintain compatibility with previous Miva Merchant versions) |
CyberCash
|
cybercash-vx.xx-platform.so
|
CyberSource ICSv2 Payment Services
|
ICS2
|
ics2-vx.xx-platform.so
And, obtain SDK from vendor. |
debit-it!
|
OpenSSL
|
|
E-Commerce Exchange/QuickCommerce 3.0 Payment Gateway
|
QuickCommerce
|
authnet-vx.xx-platform.so
|
e-ValuCheck
|
OpenSSL
|
|
FedEx Shipping
|
OpenSSL
|
|
GlobalCommerce Payment Gateway
|
GlobalCommerce
|
Obtain from vendor.
merchantcommerceinc.com |
Innovative Gateway Solutions
|
OpenSSL
|
|
Lynk Internet Processing
|
OpenSSL
|
|
Miva Merchant Marketplace (4.14 and above)
|
OpenSSL
|
|
Miva Merchant Payment
|
ICS2
|
ics2-vx.xx-platform.so
|
Moneris e-SELECT Payment Service
|
e-SELECT
|
Obtain from vendor.
|
Paradata Payment Service
|
Paradata
|
Obtain from vendor
|
PayPal Instant Payment Notification
|
OpenSSL
|
|
PayQuake (formerly U.S. Merchant Systems)
|
OpenSSL
|
|
R-P-G (Rodopi Payment Gateway)
|
OpenSSL
|
|
USPS Shipping
|
none
|
|
Verisign Payflow Link
|
none
|
|
Verisign Payflow Pro (PaymentNet)
|
PNTransact
|
Obtain SDK from the vendor.
|