Page 1 of 3123

PHP Warning: Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

[04-Sep-2010 13:46:24] PHP Warning:  Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

I’ve received this bug. Just make sure the value is not equal to zero, then it won’t be divided by it.

<!– EOT; $tmpCount=0; $idp = 100/$db_txtadnum; foreach ($arrayAdvert as $value) {

if ($tmpCount==0) {print <<<EOT –>

change to.

. . . → Read More: PHP Warning: Division by zero in ~/public_html/forums/cn/template/wind/thread.htm on line 14

Problem with index.php/archives and index.php/category

We know that WordPress is most famous blog in the world, and the default link for WordPress is using /archives and /category.

But this make problems to those sites that are not using WordPress, like my site is using Phpwind.

Most of the search engine in the world will search for example.com/archives/… example.com/category/… . . . → Read More: Problem with index.php/archives and index.php/category

CAPTCHA token file is missing

After you install the SI Contact Form WP plugin, you may face this error while sending the form.

There is a problem with the directory /captcha-secureimage/captcha-temp/. The directory is not found, a permissions problem may have prevented this directory from being created. Fixing the actual problem is recommended, but you can uncheck this . . . → Read More: CAPTCHA token file is missing

Slipper lobster

DSCF5781

It take me few minutes to find the name of this. Finally I found the name of it, it is called

Slipper lobster 琵琶虾

I cost me only 250 Baht / KG. If you take meal in any restaurant they will charge 500 Baht or more than that.

#gallery-1 { margin: auto; . . . → Read More: Slipper lobster

WordPress Permalinks

Many WP users still showing ugly url on thier blog or WP sites, why not enable this Permalinks feature and make it look nicer and without those numeric ?

Many WP sites showing like

example.com/?cat=4 example.com/?p=196 example.com/?feed=rss2

Don’t you feel that this feel better ?

example.com/category/ example.com/this-is-my-page/ example.com/feed/

It is just a few . . . → Read More: WordPress Permalinks

-bash: /bin/rm: Argument list too long

Cannot do mass delete ? Cannot remove spam files ?

If you have too many files and with long file name. It is enable to delete using rm -rf or rm *.xx

Here is the solution for the mass delete.

find . -name ‘spam-file-*’ | xargs rm

find . -name ‘*’ | xargs . . . → Read More: -bash: /bin/rm: Argument list too long

Check Linux HDD before Failure

Some people blame that their server hard disk failure or bad sector. Actually can prevent this happen. You must understand the S.M.A.R.T that provide some informations in your hard disk. If any Raw Read Error Rate data is not 0 or more than 0, I suggest you change the hard disk now to . . . → Read More: Check Linux HDD before Failure

Generate Shorewall blacklist from Spamhaus and DShield

vi /etc/shorewall/makeblacklist

Paste the code below, and save it.

#!/bin/sh

echo "#ADDRESS/SUBNET PROTOCOL PORT" > /tmp/blacklist
wget -q -O - http://feeds.dshield.org/block.txt | awk --posix '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.0\t/ { print $1 "/24";}' >> /tmp/blacklist
wget -q -O - http://www.spamhaus.org/drop/drop.lasso | awk --posix '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\// { print $1;}' >> /tmp/blacklist
echo "#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE" >> /tmp/blacklist
mv /tmp/blacklist /etc/shorewall/blacklist

shorewall refresh &>/dev/null
Continue reading Generate Shorewall blacklist from Spamhaus and DShield

Incoming search terms:

Random freezes in Windows 7 64bits

If you feel random freezes in Windows 7 64 Bits or random freeze in Google Chrome, FireFox, IE8, IE9. I’m sure is the problem of your hard disk. You need to try few of the hard disk application tools or utilities to check out the error. I did to use scan disk and other disk scanning tools that scanning in Vista. I can’t find the solution of it, so I decide to format and do clean install to Windows 7 64bits. But I get the same problem – random freezes again. I keep find the solution in internet, and I found the tools HD Tune Pro. You could download using Vuze for the newest version. Try to view the S.M.A.R.T first see weather have Raw Read Error or Raw Write Error or Current Pending Sector.
Continue reading Random freezes in Windows 7 64bits

Incoming search terms:

Scandisk /chkdsk log file in windows 7

Every time after you scandisk or chkdsk in Windows boot up, it will store the log file to your windows.
But where is it ?

So, you just right click My Computer … Manage … System Tools … Event Viewver … Windows Logs … Application …

Then looking for Wininit, you will found the folloing below.
Continue reading Scandisk /chkdsk log file in windows 7

Incoming search terms:

Page 1 of 3123

Advertisement