Ramblings from MostlyChris

Tech stuff and a bit more

Browsing Posts published in March, 2009

This is a super simple site redirect. This, of course, can get much more complicated than what is shown here. Place this in the apache configuration file (non-Plesk boxen) or in a .htaccess file. Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] —– If you want to redirect a site using the httpd.conf file inside [...]

Use this little one liner to grab the number of hits from the apache access logs. DATE=`date +%d.%b.%Y`':';for i in `lsof -p $(ps faxwwwu|awk '$1 ~ /^root$/ && $11 ~ /httpd$/ {print $2|"head -1"}' )| awk '$9 ~ /access_log$/ {print $9| "sort -u"}'`; do echo "——-"$i"——"$DATE;awk '$4 ~ /^.'$DATE'/ {hit[substr($4,2,2)"\t"substr($4,14,2)"."substr($4,17,1)]++;ip[$1]++} END { for (i in [...]

Recently, I ran into an error while attempting to install a PECL package on a Redhat 5.3 64bit server. —- Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 23040 bytes) in /usr/share/pear/PEAR/Builder.php on line 263 —- I checked the memory limit setting in /etc/php.ini and it was set for 16M so [...]