Hi cactus,
My situation is that I have a custom ecommerce site where the third party programmer designed the software to use a system variable to define the path of where to find the applications files. Whithout this system variable defined it will not work.
The way we got it working in SME6x was by adding two lines to /etc/init.d/httpd file in the section below
start() { of the httpd file.... like this:
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
STORE_BASE=/home/e-smith/files/ibays/store
export STORE_BASE echo -n $"Starting $prog: "
daemon $httpd `moduleargs` $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/httpd
return $RETVAL
}
stop() {
The two added lines set the variable that tells my ecommerce website where to find it's custom config files.
I wrote a simple info.php script to obtain the two reqired variables if things are working properly I should get a value returned for
Here is the info.php file I made to test if the variable is present.
start of file ----------
<body bgcolor="rgb(210,160,95)"
<strong>This php script is to echo out the two necessary STORE variables to confirm that they are set as required.</strong></br></br>
<div>Server Name =
<td><strong><?php echo $_SERVER['SERVER_NAME'] ?></strong></td></div></br>
<div>STORE Base Directory =
<td><strong><?php echo getenv('STORE_BASE') ?></strong></td></div></br></br>
<font color=red <strong>If you not conficts between what is shown here and where you have your STORE files located you will need to correct this before continuing!</strong></font>
</bgcolor></br></br>
End of file -------------
The results displayed by this php file should indicate the
Server Name =
www.mycompany.comSTORE Base Directory = /home/e-smith/files/ibays/store
This is all I'm trying to accomplish.
Thanks for helping ...
edb