December 2006

More Apache 2.2 Mod_Auth_MySQL Issues

by damonp on December 28, 2006

in SysAdmin

I have found some configurations of Apache 2.2 with Mod_auth_mysql producing other 500 errors. The error log shows:

Internal error: pcfg_openfile() called with NULL filename

In Apache 2.2, the mod_auth_basic module may be the authoritative access module by default. To use Mod_auth_mysql add the following line as shown below in your Mod_auth_mysql configurations in httpd.conf or .htaccess files.

Before:

AuthMySQLEnabled on

After:

AuthBasicAuthoritative Off
AuthMySQLEnabled on

Popularity: 2%

{ 0 comments }

Argument list too long – Workarounds

by damonp on December 28, 2006

in Snippets,SysAdmin

Trying to clean out my SPAM folder:

[root@atlas cur]# rm -f *
-bash: /bin/rm: Argument list too long

Try this:

for x in *; do rm -f $x; done

Or:

find . -name '*' -print0 | xargs -0 rm

Popularity: 3%

{ 2 comments }

Hack to Open Popup Pages in Main Window

15 December 2006

I hate popups and links that open in a new window. I can control where I want windows to open. If I want a new window or tab, I’ll use the appropriate key combinations when clicking the link. If a window opens in a popup without a menu bar or url bar, hit Apple + [...]

Read the full article →

Deportment

14 December 2006

n. A manner of personal conduct; behavior.

Read the full article →

Perl Search and Replace

6 December 2006

perl -pi -e "s/SEARCH/REPLACE/" FILES Example (from Awstats configuration): perl -pi -e "s/AllowToUpdateStatsFromBrowser=0/AllowToUpdateStatsFromBrowser=1/" *.conf If SEARCH is a file path, make sure and not beat your head for an hour. Escape the path breaks (‘/’) or change the regep delimiters (ex. ‘|’): perl -pi -e "s|SEARCH|REPLACE|" FILES

Read the full article →

Somnambulist

6 December 2006

a person who engages in somnambulism (sleepwalking) a term used in hypnosis to indicate someone of high enough suggestibility to follow suggestions without the need for a formal trance

Read the full article →

MySQL Slow Query Logging

5 December 2006

Add to /etc/my.cnf under [mysqld] stanza MySQL5 log_slow_queries  = /var/log/mysqld-slow.log long_query_time   = 1 MySQL3, MySQL4 log-slow-queries=/var/log/mysqld-slow.log set-variable    = long_query_time=1

Read the full article →