<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ask the German &#187; Programming</title>
	<atom:link href="http://www.askthegerman.com/archives/category/webtech/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.askthegerman.com</link>
	<description>"the owl of Minerva spreads its wings only with the falling of the dusk"</description>
	<lastBuildDate>Thu, 30 Apr 2009 10:26:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Monitor your Tomcat Servlet on a regular basis</title>
		<link>http://www.askthegerman.com/archives/274</link>
		<comments>http://www.askthegerman.com/archives/274#comments</comments>
		<pubDate>Thu, 30 Apr 2009 08:30:55 +0000</pubDate>
		<dc:creator>Volker</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TomCat]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=274</guid>
		<description><![CDATA[Lets assume you have enabled the monitoring capabilities of your tomcat. If you do not know how to achieve this see my earlier posting here about. Now it is cool to monitor your application on a regular basis. Because I&#8217;m used to shell scripting in LINUX I present you here a scripting solution within a [...]]]></description>
			<content:encoded><![CDATA[<p>Lets assume you have enabled the monitoring capabilities of your tomcat.<br />                   If you do not know how to achieve this see my earlier <a href="/archives/252" title="Enabling tomcat monitoring capabilities">posting</a> here about.</p>
<p>Now it is cool to monitor your application on a regular basis. <br />                   Because I&#8217;m used to shell scripting in LINUX I present you here a scripting solution within a bash shell. But I&#8217;m sure you can do the same in Windows. <br />                   The idea is to set up a cron job ( for windows use the scheduler) and get the statuspage from your tomcat every &#8211; lets say &#8211; five minutes.<br />                   Get some of the interesting values out of this page and save them in a csv &#8211; File.<br />                   Create a new file every day. Perhaps you want to use this files as input for a spreadsheet program to create some nice charts.</p>
<p>But to be honest &#8211; this is a very special script &#8211; you have to adopt it to your needs.<br />                   This are the basic prerequisites:</p>
<ul>
<li>you need linux to run it (this script is developed on a SUSE &#8211; Distribution)</li>
<li>eventually you need to install some tools (I think the w3m tool is not bundled with every linux distribution)</li>
<li>this script only! works correct with a tomcat 6.0 version</li>
</ul>
<p><font face="Courier" size="1"><span style="color: #006600">#!/bin/bash<br />                   # -configure below-</span><br />                   HTTPPORT=&quot;8080&quot; &nbsp;&nbsp; <span style="color: #0066ff"># The http Port of your tomcat</span><br />                   JKPORT=&quot;8709&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0066ff"># The Modjk Port of your tomcat (if your tomcat should be reachable from a apache webserver)</span><br />                   SERVER=&quot;localhost:$HTTPPORT&quot; <span style="color: #0066ff"># you can even monitor a tomcat on another server!</span><br />                   USER=&quot;tomcat-oper&quot; <span style="color: #0066ff"># the account and</span><br />                   PW=&quot;IwantItAll&quot;&nbsp;&nbsp;&nbsp; <span style="color: #0066ff"># password you have defined in tomcat-users.xml</span><br />                   APPL=&quot;CoolAppl&quot; &nbsp;&nbsp; <span style="color: #0066ff"># The name of your application</span><br />     <span style="color: #006600"># -configure above-</span><br />                   TODAY=`date &#8216;+%m-%d-%y&#8217;`<br />                   TIME=`date &#8216;+%H:%M:%S&#8217;`<br />                   OUTFILE=&quot;tomcat-stats-${TODAY}.csv&quot;<br />     <span style="color: #006600">#</span><br />     <span style="color: #006600">#set -x</span>&nbsp;&nbsp; <span style="color: #0066ff"># uncomment if you want to improve the script or if you are searching for a bug</span><br />     <span style="color: #006600">#</span><br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># If there is no csv-file create one and put a headerline in</span><br />                   if !(test -e $OUTFILE) then<br />          &nbsp; echo &quot;Time,FreeMemory,UsedMemory,MaxMemory,HttpThreadsMax,<br />      &nbsp; HttpThreadsBusy,ModJKThreads,ModJKThreadsBusy,Sessions&quot; &gt; $OUTFILE<br />                   fi<br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># get the statuspage from tomcat &#8211; filter it for the wanted informations &#8211; and create a temporary file</span><br />                   &nbsp;  w3m -dump http://${USER}:${PW}@${SERVER}/manager/status/all| \<br />                   &nbsp;  egrep &quot;(memory|thread|Active sessions|<br />        &nbsp; ^JVM|$HTTPPORT|$JKPORT|${APPL})&quot; &gt;/tmp/tomcat-status<br />     <span style="color: #006600">#<br />                   #</span> <span style="color: #0066ff"># put the values in variables / uncomment to get a better understanding of the process</span><br />     <span style="color: #006600">#</span><br />                   while read line<br />                   &nbsp;&nbsp;    do<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      case $line in<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           JVM)   read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  JVM_VALUE=`echo $line | awk &#8216;{print($3 &quot;,&quot; $7 &quot;,&quot; $11)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug</span></font><font face="Courier" size="1"><span style="color: #006600"><br />            #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;JVM_VALUE: &lt;$JVM_VALUE&gt;&quot;</span><span style="color: #0066ff"></span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            *${HTTPPORT}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HTTP_MAX_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #006600"></span> <span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;HTTP_MAX_THREADS: &lt;$HTTP_MAX_THREADS&gt;&quot;</span><span style="color: #0066ff"></span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  HTTP_BSY_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $11)}&#8217;`<br />     <span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug</span><br />     <span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                echo &quot;HTTP_BSY_THREADS: &lt;$HTTP_BSY_THREADS&gt;&quot;</span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           *${JKPORT}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  MODJK_MAX_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;MODJK_MAX_THREADS: &lt;$MODJK_MAX_THREADS&gt;&quot;</span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  MODJK_BSY_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $11)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                echo &quot;MODJK_BSY_THREADS: &lt;$MODJK_BSY_THREADS&gt;&quot;</span><span style="color: #0066ff"></span><br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           *${APPL}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  SESSION_CNT=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment below if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;               echo &quot;SESSION_CNT: &lt;$SESSION_CNT&gt;&quot;</span><span style="color: #0066ff"></span><br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                         ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *) ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      esac<br />                   &nbsp;&nbsp;&nbsp;    done &lt; /tmp/tomcat-status<br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># Now is the time to write the data to the csv-file</span><br />           &nbsp; echo &quot;${TIME},${JVM_VALUE}${HTTP_MAX_THREADS}${HTTP_BSY_THREADS}<br />      &nbsp; ${MODJK_MAX_THREADS}${MODJK_BSY_THREADS}${SESSION_CNT}&quot; &gt;&gt;$OUTFILE<br />                   exit</font></p>
<p><em>*) be aware that based on word wrapping this script might not work instantly</em> </p>
<p>Create a scriptfile (e.g. tomcat-check.sh) and apply the script to your tomcat. Then edit your crontab.                </p>
<p>There should be a line like:<br />     <strong>&quot;*/5 * * * * cd ~/statistics; ./tomcat-check.sh  1&gt;tomcat-check.log 2&gt;&amp;1&quot;</strong></p>
<p>And then the script should create the csv-files. I&#8217;m not used to excel &#8211; but even I managed to create a more or less interesting diagram from this data. Note how regular the memory behaves while there is no user session.</p>
<p><img alt="Tomcat Monitoring Graphic" title="Tomcat Monitoring Graphic" src="/wp-content/uploads/tomcat/tomcat-graphic-small.jpg" />&nbsp;</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F274';
  addthis_title  = 'Monitor+your+Tomcat+Servlet+on+a+regular+basis';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/274/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting MySQL Data</title>
		<link>http://www.askthegerman.com/archives/241</link>
		<comments>http://www.askthegerman.com/archives/241#comments</comments>
		<pubDate>Mon, 22 Dec 2008 12:50:59 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[address book]]></category>
		<category><![CDATA[desc table]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Gui]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[outfile]]></category>
		<category><![CDATA[statement]]></category>
		<category><![CDATA[use database]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=241</guid>
		<description><![CDATA[Living in a world of GUIs (Graphical User Interface) many people are no longer aware about what SQL can do. Recently a friend asked me about, is it possible to extract the email adresses of my registered user out of my Joomla? Sure it is! It is not even difficult and the idea behind was [...]]]></description>
			<content:encoded><![CDATA[<p>Living in a world of GUIs (Graphical User Interface) many people are no longer aware about what SQL can do. Recently a friend asked me about, is it possible to extract the email adresses of my registered user out of my Joomla? Sure it is!</p>
<p>It is not even difficult and the idea behind was to load them into some email list to send out season greeting to all subscribers. To keep it simple here I will explain it by using a more common wordpress example, but in principle it can be done for any data the same way. </p>
<p>Most email clients are able to import a CSV (Comma separated List of Values) File by default, as also Excel or Access will &#8216;eat&#8217; them without problems.</p>
<p>Now we have to invoke the MySQL Command Line Client or any other tool which enables us to execute a&nbsp; SQL Statement hopefully we will ending up with such a prompt:</p>
<p><em>mysql&gt; </em></p>
<p>There we first tell MySQL&nbsp; to work with the specific database in question.</p>
<p><em>mysql&gt; use DATABASE</em> &nbsp; &nbsp; (e.q &nbsp; use wordpress)</p>
<p>With the command <em>desc</em> we can get a field description of our table.</p>
<p><em>mysql&gt; desc TABLENAME</em>&nbsp;&nbsp; (e.q.&nbsp; desc wp_users)</p>
<p>Knowing about the table structure now, with <em>select</em> we can extract the data wished:</p>
<p><em>mysql&gt; select user_nicename as Name,user_email as Email from wp_users;<br />        +&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />        | Name&nbsp; | Email&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />        +&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />        | admin | admin@localhost.com |<br />        +&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />        1 row in set (0.00 sec)</em></p>
<p>Seeing the output and being sure about the result will match our needs we are now finally going to spool the query result into a file:</p>
<p><em>mysql&gt; select user_nicename,user_email into outfile &#8216;c:/temp/u_emails.csv&#8217; fields terminated by &#8216;;&#8217; from wp_users;<br />        Query OK, 1 row affected (0.01 sec)</em> </p>
<p>Content of &quot;c:/temp/u_email.csv&quot;:</p>
<p><em>admin;admin@localhost.com</em></p>
<p>or as variation:</p>
<p>mysql&gt; select user_nicename,user_email into outfile &#8216;c:/temp/u_emails.txt&#8217; fields enclosed by &#8216;&quot;&#8217; terminated by &#8216;;&#8217; from wp_users;<br />        Query OK, 1 row affected (0.01 sec) </p>
<p>Content of &quot;c:/temp/u_email.csv&quot;:</p>
<p><em>&quot;admin&quot;;&quot;admin@localhost.com&quot;</em></p>
<p>And now it should be easy for you to import all emails addresses within your email client&#8217;s address book.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F241';
  addthis_title  = 'Extracting+MySQL+Data';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up BI Publisher against MySQL</title>
		<link>http://www.askthegerman.com/archives/197</link>
		<comments>http://www.askthegerman.com/archives/197#comments</comments>
		<pubDate>Sun, 07 Dec 2008 17:08:35 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[Apache Tomcat]]></category>
		<category><![CDATA[BI Publisher]]></category>
		<category><![CDATA[Business Intelligence Suit]]></category>
		<category><![CDATA[Classpath]]></category>
		<category><![CDATA[Data Source]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WEBDAV]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xmlp-server-config.xml]]></category>
		<category><![CDATA[xmlpserver.war]]></category>
		<category><![CDATA[XMPL Server]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=197</guid>
		<description><![CDATA[Oracle&#8217;s BI Publisher which is part of the Oracle Business Intelligence Suit has at least within Enterprise Computing environment established as a reliable and preferable choice when it comes to replace the somewhat aged Oracle Reports. Once being familiar with it you will ask yourself about why switching tool when it comes to the need [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle&#8217;s BI Publisher which is part of the Oracle Business Intelligence Suit has at least within Enterprise Computing environment established as a reliable and preferable choice when it comes to replace the somewhat aged Oracle Reports.</p>
<p>Once being familiar with it you will ask yourself about why switching tool when it comes to the need of creating reports in a normal web design world mostly using MySQL Databases within a &quot;LAMP&quot; environment.</p>
<p>Written as an universal reporting tool BI Publishes does offer us a more or less universal data interface based on JDBC connections. And being able to act itself as a callable web service offering WEBDAV services based on XML data exchange it anyway seems to be an excellent choice for this world.</p>
<p>Already Oracle&#8217;s installation instructions does give you a quick idea about setting up BI Publisher working against some MySQL Database. But acting&nbsp; in a Web environment you might find it cool integration the BI Publisher within an already existing Apache Tomcat environment and for exactly this environment I will give you a short explanation about getting things together and ready for work.</p>
<p>First we will pick the BI Publisher software itself by copying the xmlpserver.war file from the distribution DVD and throwing it into the webapps folder of our Apache Tomcat. Waiting a few seconds until the self-deploying mechanism of the Apache Tomcat has extracted the files for us, we need to specify the access path to our project and development repository within the file xmlp-server-config.xml.</p>
<p>Having done that, we need to add the MySQL JDBC driver to our system and making it known within the environment of the Apache Tomcat. (The MySQL JDBC driver can be downloaded from: <a href="http://www.mysql.com/products/connector/j/">http://www.mysql.com/products/connector/j/</a>.) </p>
<p>So with the downloaded fileready, we have to extract it to any place we like onto our disk. Just I would recommend you to put it somewhere close to your MySQL installation for you being able to later on remember it again. Finally extracted and ready to use, we have to add the information about the mysql-connector-java- <version>-bin.jar file to the Java Classpath of the Apache Tomcat and finally restarting it:</version></p>
<p><img alt="Configuring Java Classpath" title="Configuring Java Classpath" src="http://www.askthegerman.com/wp-content/uploads/bip/bip01.jpg" height="290" width="300" />&nbsp;</p>
<p>Having this set, as a last step we have to invoke the BI Publisher itself, in which we then will configure the new JDBC data source within the Admin region of it: </p>
<p><img alt="Configuring JDBC Data Source" title="Configuring JDBC Data Source" src="http://www.askthegerman.com/wp-content/uploads/bip/bip02.jpg" height="155" width="400" />&nbsp;</p>
<p>And now with this tweaking ready, MySQL DB should connect, open and work for you like a charm. </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F197';
  addthis_title  = 'Setting+up+BI+Publisher+against+MySQL';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/197/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Administration Tools</title>
		<link>http://www.askthegerman.com/archives/163</link>
		<comments>http://www.askthegerman.com/archives/163#comments</comments>
		<pubDate>Sun, 23 Nov 2008 14:13:51 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[CocoaMySQL]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[MyDB Studio]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[phpMyBackupPro]]></category>
		<category><![CDATA[relational]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=163</guid>
		<description><![CDATA[Being forced to work with MySQL Databases, not every Web Developer is familiar with databases in general. Now the good news is that when working in a LAMP (Linux, Apache, MySQL and PHP) environment you do not really need to have deep knowledge about relational databases to succeed. Most tools like CMS do a full [...]]]></description>
			<content:encoded><![CDATA[<p>Being forced to work with <a href="http://www.mysql.com/" title="MySQL, a famous relational database engine" target="_blank">MySQL Databases</a>, not every Web Developer is familiar with databases in general.</p>
<p> Now the good news is that when working in a <a href="http://en.wikipedia.org/wiki/LAMP" title="A synonym for a Linux, Apache, MySQL and PHP environment" target="_blank">LAMP</a> (Linux, Apache, MySQL and PHP) environment you do not really need to have deep knowledge about relational databases to succeed.</p>
<p> Most tools like <a href="http://en.wikipedia.org/wiki/Content_Management_System" title="Synonym for Content Management System" target="_blank">CMS</a> do a full automated setup for you and the only knowledge it needs to have starting with them, is the server and database name and finally the login credentials (username/password) to access it.</p>
<p> Just later on the one or other maintenance work will occur and you will feel the need of having some nice and neat database interface to work with. Knowing about this need today I will recommend you a few tools and you should feel free to choose one or each of them based on your platform and taste.</p>
<p>The first tool I will recommend you is called <a href="http://www.phpmyadmin.net/home_page/index.php" title="Browser base Admin tool for MySQL" target="_blank">phpMyAdmin</a>. It is written in <a href="http://www.php.net" title="Hypertext PreProcessor" target="_blank">PHP</a> and as a so called browser tool it works platform independent and flawless in all common browsers. Very often being offered by hosting providers it is mostly already part of your hosting package and easy to access and use. Coming along with all necessary options like browsing and navigating through your databases, it also offers a SQL interface and the often necessary export/import options. Personally it is my favorite tool to work with.</p>
<p>Once you are familiar with phpMyAdmin, <a href="http://www.phpmybackuppro.net/" title="Browser based Export/Import tool for MySQL" target="_blank">phpMyBackupPro</a> is another very similar tool you might find it worth to look at. Also browser based it is mainly written for interactive exports and imports, but can get also use for scheduled automatic backups.</p>
<p> For Windows platform only I would like to recommend you a tool called <a href="http://www.mydb-studio.com/" title="Windows base Admin tool for MySQL">MyDB Studio</a>. Coming along with a well designed interface it offers all features you need and the license it needs is given away for free in case you only use it for private and non commercial interests. It just needs you to give them a valid email address and the key is emailed to you quickly after.</p>
<p>And now finally and last in case you are such a Macintosh guru, I would like to recommend you <a href="http://cocoamysql.sourceforge.net" title="Macintosh based Admin tool for MySQL " target="_blank">CocoaMySQL</a>. It does a similar great job like the others and can get used right away after the installation has taken place. What I like is the console view of is, showing you all command issued during the past and looking at it you might even learn some <a href="http://en.wikipedia.org/wiki/SQL" title="Structured Query Language" target="_blank">SQL</a> (Structured Query Language).</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F163';
  addthis_title  = 'MySQL+Administration+Tools';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Settings in a Shared Environment</title>
		<link>http://www.askthegerman.com/archives/59</link>
		<comments>http://www.askthegerman.com/archives/59#comments</comments>
		<pubDate>Fri, 07 Nov 2008 15:42:39 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[shared hosting]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=59</guid>
		<description><![CDATA[Working with LAMP (Linux, Apache, MySQL and PHP) Applications we sooner or later do run into the need to change our actual runtime environment for it. Mostly based on specific PHP settings an application does need to be able to run first, we have to specify, change or increase PHP default settings, but do feel [...]]]></description>
			<content:encoded><![CDATA[<p>Working with LAMP (<strong>L</strong>inux, <strong>A</strong>pache, <strong>M</strong>ySQL and <strong>P</strong>HP) Applications we sooner or later do run into the need to change our actual runtime environment for it. Mostly based on specific PHP settings an application does need to be able to run first, we have to specify, change or increase PHP default settings, but do feel somewhat handicapped within a shared hosting environment. Usually Admins there do not allow everybody allow to modify or hack their central configuration files on the server.</p>
<p>But also for this situation clever developers have thought about a trick to help their community to overcome such hassle.</p>
<p> As a matter of fact it is possible to change PHP configuration settings within .htaccess very easily for everyone.</p>
<p>For example it is possible to</p>
<blockquote><p><span style="font-weight: bold">Prevent Global Variable Injection Attacks</span><strong> with:</strong></p>
</blockquote>
<p><strong> </strong></p>
<ul></ul>
<div class="codecontent">
<ul>
<li><em>php_flag register_globals off</em></li>
</ul>
</div>
<blockquote></blockquote>
<blockquote><p><span style="font-weight: bold">Prevent Cross Site Scripting (XSS) Attacks with:</span></p>
</blockquote>
<ul></ul>
<div class="codecontent">
<ul>
<li><em>php_flag allow_url_fopen off </em></li>
</ul>
</div>
<blockquote></blockquote>
<blockquote><p><span style="font-weight: bold">Prevent Code Injection Attacks with:</span></p>
</blockquote>
<ul></ul>
<div class="codecontent">
<ul>
<li><em>php_flag magic_quotes_gpc on</em></li>
</ul>
<p> To do so</p>
</div>
<p>1. Open the <span style="font-style: italic">.htaccess</span> file located in your site&#8217;s home directory, or if you don&#8217;t have one, create a blank one now. </p>
<p>2. Add any of the following code samples to your .htaccess file, each on it&#8217;s own line.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F59';
  addthis_title  = 'PHP+Settings+in+a+Shared+Environment';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/59/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
