Site Archives
Safe auto restart for httpd after updating httpd.conf for apache
If you modify your apache /etc/httpd/conf/httpd.conf configs as often as I do, you will know it is a bit tedious to constantly test for valid syntax in the httpd.config and then restart apache if all is good. With the help of a couple of friends I came up with this bash function:
PLAIN TEXT
CODE:
httpdreload () {
[...]
Yum update causes conflicts with file from package
Apparently I am not the only one with this issue. My server runs MailScanner which requires perl-IO. If you have the latest version of perl on your system with yum, you might run into these errors:
PLAIN TEXT
CODE:
Transaction Check Error:
file /usr/share/man/man3/IO.3pm.gz from install of perl-IO-1.2301-1.el5.rf conflicts with file from package perl-5.8.8-10.el5_2.3
file /usr/share/man/man3/IO::Dir.3pm.gz from install [...]
Fixing Linux pam.d issue – Deprecated pam_stack module
This appeared thousands of times in my log:
PLAIN TEXT
CODE:
Deprecated pam_stack module called from service "sshd"
Not just for sshd, but also for pop and pop3 and smtp. Searching Google for a bit I came across this fix:
Change the lines like this:
PLAIN TEXT
CODE:
auth required pam_stack.so service=system-auth
to this:
PLAIN TEXT
CODE:
auth include [...]
aMember check for a logged in user using php
Recently I needed to verify if a user was logged in on a site using aMemberPro. But the site uses the new_write method, and I needed a way to check for this quickly in a php file for an include block. Here is what I added to the php page:
PLAIN TEXT
CODE:
session_start();;
$amember_id = (isset($_SESSION['_amember_id']) && !empty($_SESSION['_amember_id'])) [...]
EE: Using {member_id} inside of {exp:query sql…}
PLAIN TEXT
CODE:
{exp:query sql="SELECT (m_field_id_10) as member_field FROM exp_member_data WHERE member_id='<?php global $SESS; echo $SESS->userdata['member_id'];?>'"}
{exp:weblog:entries weblog="{my_weblog}" entry_id="{chapters}" dynamic="off"}
<li><a href="/weblog/{url_title}">{title}</a></li>
{/exp:weblog:entries}
{/exp:query}
I had to use as {member_id} does not get understood inside of the {exp:query sql=''}{/exp:query} tag set.
New category for ExpressionEngine code snippets
Today I realized that I need to create a new category here for code snippets. I keep misplacing them, and a lot of them are really simple and really forgettable. You can view code snippets here.
EE: Stand alone member login form
PLAIN TEXT
CODE:
{exp:member:login_form return="site/index"}
<p><label>Username</label><br />
<input type="text" name="username" value="" maxlength="32" class="input" size="15" /></p>
<p><label>Password</label><br />
<input type="password" name="password" value="" maxlength="32" class="input" size="15" /></p>
{if auto_login}
<p><input class='checkbox' type='checkbox' name='auto_login' value='1' /> Auto-login on future visits</p>
{/if}
<p><input class='checkbox' type='checkbox' name='anon' value='1' checked='checked' /> Show my name in the online users list</p>
<p><input type="submit" name="submit" value="Submit" /></p>
<p><a href="{path=member/forgot_password}">Forgot your password?</a></p>
<p><a href="{path=member/register}">Register as a new member</a></p>
{/exp:member:login_form} [...]
How to permanently exclude packages with yum
To permanently exclude packages from yum when running update or check-update, simply edit the /etc/yum.conf file adding the following:
exclude= [package1] [package2] [package3]
List all the packages you to exclude here. Since others had asked the same question, I figured it was worth noting here.
We, the people of the planet, have a CEO
Doug Erwin, chairman and CEO of The Planet has issued an audio message to the people of The Planet. I realize that the situation is not a laughing matter at all, but I had to snicker a bit at how it comes out when Mr. Erwin says he is the chairman and CEO of the [...]
Expression Engine on its way
It is late and I am tired, so just one fast post tonight. Shortly I am hoping to convert this WordPress site to Expression Engine. I have been using ExpressionEngine for some time now and greatly enjoy it. Especially since this latest incarnation of WordPress, I am have not been completely happy with WP.
So, [...]
Find It Quickly
Find what you're looking for quickly by using our keyword search. Can't find it? Try our links below.

