<?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>Meek Consulting</title>
	<atom:link href="http://meekconsulting.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://meekconsulting.com/wordpress</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 17 Jan 2012 04:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>turning off greylisting with Plesk</title>
		<link>http://meekconsulting.com/wordpress/?p=118</link>
		<comments>http://meekconsulting.com/wordpress/?p=118#comments</comments>
		<pubDate>Tue, 17 Jan 2012 04:36:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=118</guid>
		<description><![CDATA[Tried this command tonight to turn off greylisting.  Hopefully other spam filters will catch most spam so this will allow legitimate email through. /usr/local/psa/bin/grey_listing --update-server -status off To find info on greylisting use this: /usr/local/psa/bin/grey_listing --info-server]]></description>
			<content:encoded><![CDATA[<p>Tried this command tonight to turn off greylisting.  Hopefully other spam filters will catch most spam so this will allow legitimate email through.</p>
<blockquote><p><code>/usr/local/psa/bin/grey_listing --update-server -status off</code></p></blockquote>
<p>To find info on greylisting use this:</p>
<blockquote><p><code>/usr/local/psa/bin/grey_listing --info-server</p>
<p></code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>plesk perl / cgi scripts &#8212; permissions!!!</title>
		<link>http://meekconsulting.com/wordpress/?p=114</link>
		<comments>http://meekconsulting.com/wordpress/?p=114#comments</comments>
		<pubDate>Mon, 07 Nov 2011 04:18:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=114</guid>
		<description><![CDATA[This is a good instruction i found for pemissions Directory permissions and ownership are important too. The /var/log/httpd/suexec_log  is the place to look when regular error_log doesn&#8217;t show anything&#8230; &#160; Firstly, make sure you upload the script into the cgi-bin in ASCII mode. This is a problem more oftern then you can imagine. chmod 755 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a good instruction i found for pemissions</p>
<p>Directory permissions and ownership are important too.</p>
<p>The /var/log/httpd/suexec_log  is the place to look when regular error_log doesn&#8217;t show anything&#8230;</p>
<p>&nbsp;</p>
<p>Firstly, make sure you upload the script into the cgi-bin in ASCII mode. This is a problem more oftern then you can imagine. chmod 755 the script. Check permissions are USERID:psacln (the directory should be USERID:psaserv). Of course check that the site has CGI support ticked. You can also verify the syntax of the script by running &#8220;perl -c SCRIPTNAME.CGI&#8221; and it should report syntax ok.<br />
If you&#8217;re still having problems then check the logs. Check /home/httpd/vhosts/DOMAIN/statistics/logs/error_log (some installs my use /var/www/ as opposed to the plesk standard /home/httpd/vhosts) and look for errors. This log file will usually show the error message on the screen. You may also need to check /var/log/httpd/error_log. If you still don&#8217;t see the problem then check /var/log/httpd/suexec.log for any</p>
<p>Finally, check the correct suexec version is being used. do an &#8220;ls -la /usr/sbin/suexec&#8221; and compare that to /usr/local/psa/suexec/psa-suexec. If they are different then make a backup copy of /usr/sbin/suexec to something like /usr/sbin/suexec.orig. then either copy or make a symlink of /usr/local/psa/suexec/psa-suexec into the /usr/sbin directory.</p>
<p>Hopefully this has been helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=114</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLOW log in over SSH</title>
		<link>http://meekconsulting.com/wordpress/?p=109</link>
		<comments>http://meekconsulting.com/wordpress/?p=109#comments</comments>
		<pubDate>Tue, 04 Oct 2011 13:58:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=109</guid>
		<description><![CDATA[If you are experiencing very long delays when logging into linux systems using SSH. It could be waiting for Reverse DNS to time out before giving the login prompt or password prompt. I made the following change to fix it in the /etc/ssh/sshd_config &#160; vi /etc/ssh/sshd_config Make sure the useDNS line looks like this: UseDNS [...]]]></description>
			<content:encoded><![CDATA[<p>If you are experiencing very long delays when logging into linux systems using SSH.</p>
<p>It could be waiting for Reverse DNS to time out before giving the login prompt or password prompt.</p>
<p>I made the following change to fix it in the /etc/ssh/sshd_config</p>
<p>&nbsp;</p>
<blockquote><p><strong>vi /etc/ssh/sshd_config</strong></p>
<p><strong>Make sure the useDNS line looks like this:<br />
</strong></p>
<p>Use<strong>DNS no</strong></p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing mysql slow query logs</title>
		<link>http://meekconsulting.com/wordpress/?p=105</link>
		<comments>http://meekconsulting.com/wordpress/?p=105#comments</comments>
		<pubDate>Wed, 31 Aug 2011 16:59:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=105</guid>
		<description><![CDATA[The mysql servers we use are configured to log slow queries ( those that take over 5 seconds to run or queries that do not use any index). The output is put in /var/log/mysqld.slow.log  ( on the dbhost server! ) I found a program today that is part of mysql that makes it easier to [...]]]></description>
			<content:encoded><![CDATA[<p>The mysql servers we use are configured to log slow queries ( those that take over 5 seconds to run or queries that do not use any index).</p>
<p>The output is put in /var/log/mysqld.slow.log  ( on the dbhost server! )</p>
<p>I found a program today that is part of mysql that makes it easier to use this log file to pinpoint queries that might be slowing things down.  It is called <strong>mysqldumpslow</strong></p>
<p>To run it just pass the name of the log file and it converts the variables in the queries in the log file to tokens so it can group similar queries together and tell you how often a particular query is run.  It sorts the queries by how long they take to run, so you can focus on queries your apps are running that are taking a long time to run ( and making the user wait )</p>
<p>Typically adding indexes or rewriting the query to be more efficient can greatly improve performance.</p>
<p>For example I just ran it on our db1 log and immediately realized that the query we run to check a persons PKI DN certificate ( which is run for every page we display ) was doing the query with no index on pki_dn field  &#8212; so it was sequentially scanning through the users table every time.   I created an index on pki_dn that should make that check faster.</p>
<p>To use it:</p>
<p>&nbsp;</p>
<blockquote><p>/usr/bin/mysqldumpslow /var/log/mysqld.slow.log</p></blockquote>
<p>&nbsp;</p>
<p>NOTE: your mysql database must be configure to log slow queries.  This is done with the following queries in /etc/my.cnf  ( in the main [mysqld] section )</p>
<blockquote><p>log-slow-queries = /var/log/mysqld.slow.log<br />
log-long-format<br />
long_query_time = 5<br />
log-queries-not-using-indexes=1</p></blockquote>
<p>&nbsp;</p>
<p>If the file doesn&#8217;t already exist it won&#8217;t create it. So be sure to make the file /var/log/mysqld.slow.log and set permissions to be writable by mysql user and restart mysql like this:</p>
<blockquote><p>&gt; /var/log/mysqld.slow.log</p>
<p>chown mysql:mysql /var/log/mysqld.slow.log</p>
<p>chmod 770 /var/log/mysqld.slow.log</p>
<p>service mysqld restart</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=105</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading PHP on redhat 5</title>
		<link>http://meekconsulting.com/wordpress/?p=103</link>
		<comments>http://meekconsulting.com/wordpress/?p=103#comments</comments>
		<pubDate>Tue, 19 Jul 2011 12:52:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=103</guid>
		<description><![CDATA[﻿ I updated the php ona redhat box today. This upgrade now seems to fix a bug in PHP that wouldn&#8217;t allow values of &#62; 1.5 Gig on file uploads I have the settings now set to allow up to 2.5Gig. The steps I took to upgrade it were: &#160; Be sure to save the [...]]]></description>
			<content:encoded><![CDATA[<p>﻿</p>
<p>I updated the php ona redhat box today.</p>
<p>This upgrade now seems to fix a bug in PHP that wouldn&#8217;t allow values of &gt; 1.5 Gig on file uploads</p>
<p>I have the settings now set to allow up to 2.5Gig.</p>
<p>The steps I took to upgrade it were:</p>
<p>&nbsp;</p>
<p>Be sure to save the /etc/php.ini  file first:</p>
<blockquote><p>cp /etc/php.ini /etc/php.ini.save</p>
<p>&nbsp;</p>
<p>service httpd stop</p>
<p>&nbsp;</p>
<p>yum erase php.x86_64 php-cli.x86_64 php-common.x86_64 php-devel.x86_64 php-mysql.x86_64 php-pdo.x86_64 php-pear.noarch php-pear-MDB2.noarch php-pear-MDB2-Driver-mysql.noarch</p>
<p>&nbsp;</p>
<p>yum install php53.x86_64 php53-cli.x86_64 php53-common.x86_64 php53-devel.x86_64 php53-mysql.x86_64 php53-pdo.x86_64 php-pear.noarch php-pear-MDB2.noarch php-pear-MDB2-Driver-mysql.noarch</p>
<p>&nbsp;</p></blockquote>
<p>Edit the Newly installed php.ini file and copy the customizations we have ( at the top of the file )  (NOTE these also exist further down in the file and need to be commented out there in the new file so the only reference to those settings is at the top with our desired values.</p>
<p>&nbsp;</p>
<p>service httpd start</p>
<p>[root@svn_repo etc]# vi /etc/php.ini</p>
<p>[PHP]</p>
<p>***** Customizations *******</p>
<p>allow_call_time_pass_reference = On</p>
<p>include_path=&#8221;.:/usr/share/pear:/php/includes:/usr/local/lib/php/Smarty&#8221;</p>
<p>max_execution_time = 60000</p>
<p>max_input_time = 60000</p>
<p>memory_limit = 2500M</p>
<p>upload_tmp_dir = /www/upload_tmp_dir</p>
<p>&nbsp;</p>
<p>; Maximum allowed size for uploaded files.</p>
<p>;  IMPORTANT NOTE</p>
<p>;  DO NOT SET THESE variables &gt; 1500M</p>
<p>;  apache gets confused and treats it as a negative number</p>
<p>;  and not allow anything to post..  K. Meek 10/09</p>
<p>; NOTE &#8212; make sure the post_max_size and upload_max_filesize is not set to another value below!!</p>
<p>post_max_size = 2500M</p>
<p>upload_max_filesize = 2500M</p>
<p>&nbsp;</p>
<p>;*****  end customizations ****</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Handler postDelayed to queue a task for later execution</title>
		<link>http://meekconsulting.com/wordpress/?p=101</link>
		<comments>http://meekconsulting.com/wordpress/?p=101#comments</comments>
		<pubDate>Tue, 05 Jul 2011 02:27:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=101</guid>
		<description><![CDATA[I figured out how to get my android app to auto post after a certain amount of idle time. &#160; Trick was to create a handler in the activity that is running. &#160; Then make a &#8220;Runnable&#8221; function that will do what you want. &#8212; think of this as the &#8220;function to be run later&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>I figured out how to get my android app to auto post after a certain amount of idle time.</p>
<p>&nbsp;</p>
<p>Trick was to create a handler in the activity that is running.</p>
<p>&nbsp;</p>
<p>Then make a &#8220;Runnable&#8221; function that will do what you want. &#8212; think of this as the &#8220;function to be run later&#8221;.</p>
<p>&nbsp;</p>
<p>To call it later issues handler.postDelayed(runnable_function,20000);</p>
<p>&nbsp;</p>
<p>If the user does something that makes you want to &#8220;reset&#8221; or cancel the pending call you can call handler.</p>
<p>private Handler handler = new Handler();</p>
<p>final Runnable post_score = new Runnable()<br />
{<br />
public void run()<br />
{<br />
Toast.makeText(getApplicationContext(), &#8220;Posting Score in Background.&#8221;, Toast.LENGTH_SHORT).show();<br />
new PostScoreTask().execute(S);<br />
}<br />
};</p>
<p>&nbsp;</p>
<p>// Queue up a message to Post this score<br />
handler.removeCallbacks(post_score);<br />
handler.postDelayed(post_score, auto_post_delay);</p>
<p>&nbsp;</p>
<p>I call these two commands above any time the user changes something that should be posted to the server.  But each time they do something we cancel any pending posts and &#8220;Queue&#8221; up another message to ask that it be done after the specified auto_post_delay. ( which is an integer set to number of milliseconds to wait before posting.<br />
This should cause the posting to be &#8220;near Real time&#8221; but not waste internet resources posting until current input has been completed.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=101</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELINUX local policy creation</title>
		<link>http://meekconsulting.com/wordpress/?p=96</link>
		<comments>http://meekconsulting.com/wordpress/?p=96#comments</comments>
		<pubDate>Thu, 28 Apr 2011 12:59:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=96</guid>
		<description><![CDATA[Run the command audit2allow -m local -l &#62; local.te &#60; /var/log/audit.log This will generate a local.te file that will have the policy to allow the things denied int he current audit.log You&#8217;ll want to review closely to see if those are in fact the things you want to allow. To turn this into a binary [...]]]></description>
			<content:encoded><![CDATA[<p>Run the command</p>
<blockquote><p>audit2allow -m local -l &gt; local.te &lt; /var/log/audit.log</p></blockquote>
<p>This will generate a local.te file that will have the policy to allow the things denied int he current audit.log</p>
<p>You&#8217;ll want to review closely to see if those are in fact the things you want to allow.</p>
<p>To turn this into a binary module you use this command:</p>
<blockquote><p>checkmodule -M -m -o local.mod local1.te</p></blockquote>
<p>To Create a policy that can be loaded into the kernel use this</p>
<blockquote><p>semodule_package -o local.pp -m local.mod</p></blockquote>
<p>Then to activate it use this</p>
<blockquote><p>semodule -i local.pp</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=96</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run subcommand and return output to variable in PHP</title>
		<link>http://meekconsulting.com/wordpress/?p=91</link>
		<comments>http://meekconsulting.com/wordpress/?p=91#comments</comments>
		<pubDate>Wed, 13 Apr 2011 16:49:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=91</guid>
		<description><![CDATA[If you need to run a subcommand and pull the output you can use the proc_open like below. Kevin &#60;?php &#160; $descriptorspec = array( 0 =&#62; array(&#8220;pipe&#8221;, &#8220;r&#8221;),  // stdin is a pipe that the child will read from 1 =&#62; array(&#8220;pipe&#8221;, &#8220;w&#8221;),  // stdout is a pipe that the child will write to 2 [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to run a subcommand and pull the output you can use the proc_open like below.</p>
<p>Kevin</p>
<blockquote><p>&lt;?php</p>
<p>&nbsp;</p>
<p>$descriptorspec = array(</p>
<p>0 =&gt; array(&#8220;pipe&#8221;, &#8220;r&#8221;),  // stdin is a pipe that the child will read from</p>
<p>1 =&gt; array(&#8220;pipe&#8221;, &#8220;w&#8221;),  // stdout is a pipe that the child will write to</p>
<p>2 =&gt; array(&#8220;file&#8221;, &#8220;/tmp/yourprocoutput.txt&#8221;, &#8220;a&#8221;) // stderr is a file to write to</p>
<p>);</p>
<p>$process = proc_open(&#8220;/bin/ls -l /tmp&#8221;, $descriptorspec, $pipes);</p>
<p>while (!feof($pipes[1])) {</p>
<p>$result .= fread($pipes[1], 8192);</p>
<p>print &#8220;.&#8221;;</p>
<p>}</p>
<p>print &#8220;RESULT: [$result] \n&#8221;;</p>
<p>?&gt;&nbsp;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refreshing jquery-ui tabs using php xajax calls</title>
		<link>http://meekconsulting.com/wordpress/?p=86</link>
		<comments>http://meekconsulting.com/wordpress/?p=86#comments</comments>
		<pubDate>Tue, 29 Mar 2011 02:33:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xajax]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=86</guid>
		<description><![CDATA[I have a jquery-ui tab displays information that can be edited using a xajax pop up dialog. After saving the dialog I wanted to &#8220;refresh&#8221; the current tab. This little bit of code in the server did the trick. &#160; $objResponse-&#62;addScript(&#8216; $(&#8220;#dialog&#8221;).dialog(&#8216; . &#8220;&#8216;close&#8217;);&#8221;); $objResponse-&#62;addRemove(&#8216;dialog&#8217;); $mycmd = &#60;&#60;&#60;MY_DELIMITER $(&#8220;#tabs&#8221;).tabs(&#8216;load&#8217;,$(&#8220;#tabs&#8221;).tabs(&#8216;option&#8217;,'selected&#8217;)); MY_DELIMITER; $objResponse-&#62;addScript($mycmd);]]></description>
			<content:encoded><![CDATA[<p>I have a jquery-ui tab displays information that can be edited using a  xajax pop up dialog.</p>
<p>After saving the dialog I wanted to &#8220;refresh&#8221; the current tab.</p>
<p>This little bit of code in the server did the trick.</p>
<blockquote><p>
&nbsp;<br />
$objResponse-&gt;addScript(&#8216; $(&#8220;#dialog&#8221;).dialog(&#8216; . &#8220;&#8216;close&#8217;);&#8221;);<br />
$objResponse-&gt;addRemove(&#8216;dialog&#8217;);<br />
$mycmd = &lt;&lt;&lt;MY_DELIMITER<br />
$(&#8220;#tabs&#8221;).tabs(&#8216;load&#8217;,$(&#8220;#tabs&#8221;).tabs(&#8216;option&#8217;,'selected&#8217;));<br />
MY_DELIMITER;<br />
$objResponse-&gt;addScript($mycmd);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making textarea boxes expand on entry</title>
		<link>http://meekconsulting.com/wordpress/?p=79</link>
		<comments>http://meekconsulting.com/wordpress/?p=79#comments</comments>
		<pubDate>Fri, 25 Mar 2011 19:21:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://meekconsulting.com/wordpress/?p=79</guid>
		<description><![CDATA[If you have ever worked with web forms you know that editing a large amount of text can be painful when you can only see a few lines of text at a time. Firefox 4 has a nifty feature that gives you draggable resize icon on the bottom of all textarea boxes. This is nice, [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever worked with web forms you know that editing a large amount of text can be painful when you can only see a few lines of text at a time.</p>
<p>Firefox 4 has a nifty feature that gives you draggable resize icon on the bottom of all textarea boxes.  This is nice, but rather than have to resize a field every time, I like this trick.  Just by adding the onclick and onblur tags to the textarea box as shown below you can make the text box <strong>EXPAND </strong>when you click into it to make it easier to edit.</p>
<p>Adjust the rows as you see fit.</p>
<blockquote><p>
&lt;textarea onclick=&#8221;this.rows = 35;&#8221; cols=&#8221;77&#8243; rows=&#8221;6&#8243; name=&#8221;story_txt&#8221;&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://meekconsulting.com/wordpress/?feed=rss2&#038;p=79</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

