Tags:
tag this topic
create new tag
view all tags
---+ Setting Environment Variables APPX offers six levels at which environment variables may be set: %TOC% General Environment Variable information can be found at [[APPXEnvironmentVariables][APPX Environment Variables]]. Specific Environment Variables are documented in detail at [[APPXEnvironmentVariableList][Environment Variables List]]. ---++ Global OS Environment Variables The "classic" and most general place to set environment variables is at the OS level. In Windows, they are set in autoexec.bat or the System Environment (Computer Properties, Advanced System Settings, Advanced Tab, Environment Variables button. Might require a reboot to take effect). In UNIX, they are typically set in /etc/profile ---+++ BENEFITS: <ul type="disc"> <li>Familiar to APPX veterans</li> <li>Convenient if you have a mixture of character and GUI Users</li> <li>Easy to verify what the values are by "set | more"</li> </ul> ---+++ DISADVANTAGES: <ul type="disc"> <li>variables tend to end up scattered around</li> <li>using a mixture of OS and appx.env variables leaves you with variable settings in any of many different places. This can be hard to debug!</li> <li>In character mode, the user must log out and log back in again before changes in variable values can take effect</li> <li>The Login Manager must be restarted and the users must log out and in again before changes in variable values can take effect</li> </ul> ---++ Per-user OS Environment Variables For character mode users on a Linux/Unix system you can set environment variables in their ~/.profile. This will override any OS settings or any appx.env settings. This does not work for users that connect via the Login Manager. ---++ Startup script files If you use a script to start APPX for your character mode users, you can set them in the script. ---+++ BENEFIT: <ul type="disc"> <li>Convenient</li> <li>Like appx.env, does not require reboots or system logout/logins for changes to take effect, just exiting and re-entering APPX</li> </ul> ---+++ DISADVANTAGES: <ul type="disc"> <li>Only works for character mode users</li> <li>If you don't already have an APPX startup script or batch file, for some other site-specific purpose, you probably don't want to add one. It's another file to maintain and remember the purpose of.</li> <li>Doesn't offer anything beyond appx.env's functionality, if you're not already doing other things in an APPX startup script that need scripting or batch file programming capabilities</li> <li>If someone ever runs APPX by invoking the engine directly, your script's variable settings won't be executed</li> </ul> ---++ Login Manager This technique involves changing the settings of the Login Manager. See <a href="APPXLoginManagerForUnixLinux" target="_blank">Login Manager For Unix/Linux</a> or <a href="APPXLoginManagerForWindows" target="_blank">Login Manager For Windows</a>. ---+++ BENEFIT: <ul type="disc"> <li>You can set up different ports with different settings</li> </ul> ---+++ DISADVANTAGE: <ul type="disc"> <li>Does not work for character mode users</li> </ul> ---++ Global appx.env Environment Variables The recommended method for setting environment variables is in the appx.env file ($APPXPATH/appx.env). ---+++ BENEFIT: <ul type="disc"> <li><span style="background-color: transparent;">convenient if you have a mix of Telnet and APPX/Client users</span></li> <li>all variables in a single file</li> </ul> ---+++ DISADVANTAGE: <ul type="disc"> <li>Affects all users, you cannot set up different variables on a per port or per user basis</li> </ul> ---++ Setting Environment Variables on the Command line You can also set environment variables from the command line. Just prefix the variable with 2 dashes as follows on the command line: appx --APPX_SQL_LOG=c:\logs\appx.log --APPX_CMD_LOG=0xFFFFFFFF This will set APPX_SQL_LOG and APPX_CMD_LOG for the duration of this session only. ---++ Common Problems Tech support sees various issues related to environment variables come up on a regular basis. Since forewarned is forearmed, here they are. ---+++ APPX_PRT_FI_DIR must have trailing slash Determines where APPX creates report files. Examples in UNIX and Windows: <blockquote dir="ltr" style="margin-right: 0px;"> <pre>$ export APPX_PRT_FI_DIR=/tmp/pat/</pre> <pre>C:\> set APPX_PRT_FI_DIR=\\server\printfiles\pat\</pre> </blockquote> ---+++ Make sure path names are valid For any variable requiring a file or directory pathname, make sure that all directories in the path exist. Make sure that the case you use in the variable setting matches the actual case of the filename for those environments that are case sensitive. A mistake here can cause log files to not appear, or APPX to behave incorrectly. ---+++ Setting a variable in .profile for a APPX/Client user will have no effect While a variable set in a UNIX .profile will affect a user's APPX session if they Telnet in to the APPX machine, it won't affect a APPX/Client login. Since we directly start up APPX from APPX/Client, rather than going through a Command Shell as with Telnet, no shell initialization files are processed. ---++ Comments: _Read what other users have said about this page or add your own comments._ --- <br /><span data-mce-mark="1"><span data-mce-mark="1">%COMMENT%</span></span>
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r5 - 2016-01-21
-
JeanNeron
Home
Site map
Main web
MedicaidBilling web
Sandbox web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback