Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

Monday, July 09, 2012

Adding ( passing) linux system variable to Tomcat.

Sometimes you need to pass system variables to applications running in tomcat environment. those could b for example configuration files.
Trying to pass them to start-up script as variables such as 

export TOMCAT_OPTS=-Your.var=foo
will set it in the system shell and will not pass it to the tomcat on it`s start since it runs as a different user.
Java`s System.getEnv("Your.var")
Will return: NULL value.
You need to edit relevant tomcat.conf (tomcat6.conf for example in /etc)
and add:
export Your.var=foo
to the end of file
You can check that variable s set with System.getEnv("Your.var") in you java code.



Provided by: ForthScale systems, scalable infrastructure experts

Monday, May 23, 2011

Upgrading PHP in CentOS 5

CentOS 5.x comes with PHP 5.1, this version is outdated and you probably would want to upgrade it. I used Atomic repository.
You can add it by running following command:
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
Now you can update PHP:
yum update php
yum update php-mcrypt
(you might also need to update mysql)
Verify version of running PHP:
php -v
And that all modules working as order:
php -m
Restart Apache, you are all set.

Provided by:SiQ systems, Cloud experts

Tuesday, January 10, 2006

making php interface to webinject

I`m useing webinject to check our application simple web page screated to provide interface to connect the tool to our support web site. web form executes php script and php executes perl of webinject and returnes the result file.

relevant php code:



the sw script content:
/xtr/scripts/webinject/swa/webinject.pl -c naga_config_server_id.xml >> /var/log/og_in.log

The configuration xml of webinject is set to normal output wich is redirected to log file i rotate daily. that both prevents output being returned to php code and gives me operation log on the use of the system.

Thats it,
Feodor ( Naor ) Weissmann

2026. What I Actually Do Now

It’s been over 20 years of on-and-off dumping into this blog. 27 and going years in tech, more than 10 years around AI, going back to Heili ...