<?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>Michael Eagan</title>
	<atom:link href="http://michaeleagan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaeleagan.com</link>
	<description>Discoveries of a LAMP Programmer</description>
	<lastBuildDate>Wed, 20 Jan 2010 20:27:19 +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>Protected: Video Test Post</title>
		<link>http://michaeleagan.com/2010/01/video-test-post/</link>
		<comments>http://michaeleagan.com/2010/01/video-test-post/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 23:33:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://michaeleagan.com/?p=81</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://michaeleagan.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-81">Password:<br />
<input name="post_password" id="pwbox-81" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://michaeleagan.com/2010/01/video-test-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and set_locale on Debian</title>
		<link>http://michaeleagan.com/2008/08/php-and-set_locale-on-debian/</link>
		<comments>http://michaeleagan.com/2008/08/php-and-set_locale-on-debian/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 22:44:29 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.michaeleagan.com/?p=12</guid>
		<description><![CDATA[I like to use set_locale and money_format in my applications for flexibility. You never know when you&#8217;re going to go global! I had been using RedHat for a long time, and switched to Debian as I like the distro a &#8230; <a href="http://michaeleagan.com/2008/08/php-and-set_locale-on-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I like to use set_locale and money_format in my applications for flexibility. You never know when you&#8217;re going to go global! <img src='http://michaeleagan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I had been using RedHat for a long time, and switched to Debian as I like the distro a lot better. I couldn&#8217;t get set_locale to work. Here&#8217;s what I was trying, which is almost straight out of the PHP online manual:</p>
<pre>
&lt;?php
setlocale(LC_MONETARY, 'en_US');
echo money_format('%.2n', $amount);
?&gt;</pre>
<p>But no joy. I finally figured out that the locales are a bit different in Debian. You can use the &#8216;locale&#8217; command to show what locales are actually installed on your server:</p>
<pre>
silver:~# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
silver:~# locale -a
C
en_US.utf8
POSIX
silver:~#
</pre>
<p>You can see that the locale on Debian is actually &#8216;en_US.utf8&#8242;. A quick change and my money formatting code was back to it&#8217;s old self.</p>
<pre>
&lt;?php
setlocale(LC_MONETARY, 'en_US.utf8');
echo money_format('%.2n', $amount);
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://michaeleagan.com/2008/08/php-and-set_locale-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing Daily mail.log rotation on Debian</title>
		<link>http://michaeleagan.com/2008/07/preventing-daily-maillog-rotation-on-debian/</link>
		<comments>http://michaeleagan.com/2008/07/preventing-daily-maillog-rotation-on-debian/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 22:42:57 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.michaeleagan.com/?p=3</guid>
		<description><![CDATA[My preference for server side Linux is Debian 4. As with most distributions, most of the system files are rotated on a daily, weekly, and monthly basis by logrotate. For example, in Debian the log files for apache2, aptitude, and &#8230; <a href="http://michaeleagan.com/2008/07/preventing-daily-maillog-rotation-on-debian/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My preference for server side Linux is Debian 4. As with most distributions, most of the system files are rotated on a daily, weekly, and monthly basis by logrotate. For example, in Debian the log files for apache2, aptitude, and clamav are all handled by logrotate, and the configuration files are located in /etc/logrotate.d/<br />
<code>/var/log/apache2/*.log {<br />
monthly<br />
missingok<br />
rotate 24<br />
compress<br />
delaycompress<br />
notifempty<br />
create 640 root www-data<br />
sharedscripts<br />
postrotate<br />
if [ -f /var/run/apache2.pid ]; then<br />
/etc/init.d/apache2 restart &gt; /dev/null<br />
fi<br />
endscript<br />
}<br />
</code></p>
<p>I was finding that my postfix log, mail.log, was getting rotated more often, even though it was really not very large. Sometimes it would rotat every day, sometimes every two days. But I couldn&#8217;t find any logrotate config files for the postfix logs. After a bit of searching I discovered that the mail facilities are handled by savelog, which operates in sysklogd. sysklogd is a script that runs in the daily cron at /etc/cron.daily/sysklogd.</p>
<p>A bit of the script is here, and you can see the savelog command:<br />
<code><br />
cd /var/log<br />
for LOG in `syslogd-listfiles`<br />
do<br />
if [ -s $LOG ]; then<br />
savelog -g adm -m 640 -u root -c 7 $LOG &gt;/dev/null<br />
fi<br />
done<br />
</code></p>
<p>So what is syslogd-listfiles? It will show you all files that are to be logged with syslogd.<br />
<code><br />
silver:/etc/cron.daily# syslogd-listfiles --all<br />
/var/log/mail.warn<br />
/var/log/uucp.log<br />
/var/log/user.log<br />
/var/log/daemon.log<br />
/var/log/messages<br />
/var/log/debug<br />
/var/log/auth.log<br />
/var/log/mail.err<br />
/var/log/syslog<br />
/var/log/mail.log<br />
/var/log/mail.info<br />
/var/log/kern.log<br />
/var/log/lpr.log<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://michaeleagan.com/2008/07/preventing-daily-maillog-rotation-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
