2006/12/11

Met a faker on ebay

I was going to sell my Toshiba Laptop on ebay. During the 7 days bid, I got many emails to try to pay me over $2000 to let me mail Laptop to Nigeria. I knew they are fakers, so I just ingored them.

I was happy when I saw the bidding amount was rising day by day. Yesterday is final day, and the bid growing from $380 to $600. Finally as guy whose ebay ID is Jazzman06 bid it with $687.

I had a feeling that the guy is a faker after I emailed him after bidding, because he did not reply me. I got a Paypal confirmation that $787 was added into my Paypal account this morning, but it is very easy to determine it is a spoolf email, for the email was not sent from Paypal server.

I decided to make a second offer to the next bidder tomorrow. Unfortunately, that guy called Ebay to cancel the bid for the reason that the bid was took place without the account owner's authorization, and Ebay just removed my list. What the hell this world is?!

I don't know how many fakers on ebay, and I just wanted to sell something. Although, those fakers do not have a deep fake-skills, but what could I do? I cannot find any wrong I did during this trade that could avoid this situation. Maybe I just was out of luck.

Good luck next time! :)

2006/12/10

CGI-BIN

WOW!
You have to set cgi-bin's permission as 755, otherwise, you will get error like 'Premature end of script headers', even you have higher permission for cgi-bin, for example, '775'.
It is a kind of weird, Hum!

2006/12/06

Buy a server

Good servers have dual processors if not quad or more. SCSI is the bus interface of choice for a good server. This is because SCSI is faster than EIDE when it comes to disk transfer an you can connect up to 16 devices to a SCSI chain where as you can only have 2 on a EIDE chain. SCSI drives can spin upward to 15K RPM's where as most of the fastest EIDE drives are 7200K or 10K RPM. Good servers have redundant power supplies and hot swappable disks. A hardware RAID solution is also common with fast servers. This is not only for performance but also for data safty. In a RAID-5 setup if any one given disk fails no data is lost and a new disk can be added back to the RAID array with out taking the server down thanks to the hot swap function. Graphics is not a priority with servers so they often have a very basic video card. Dual NICs are common for both redundancy as well as performance. You can configure one nic to listen and one nic to talk or you can set one up to be a fall over.

from: http://www.v7n.com/forums/web-hosting-forum/12075-server-vs-pc.html

2006/11/21

Solution for 'php connect to mysql problem'

Q: I keep getting an Error connecting to database message but I'm sure my configuration is correct.
A: Try resetting your MySQL password manually. If you have access to MySQL via shell, try issuing:

SET PASSWORD FOR 'wordpressusername'@'hostname' = OLD_PASSWORD('password');

note: If you are using a version of MySQL prior to 4.1, use PASSWORD instead of OLD_PASSWORD. If you do not have shell access, you should be able to simply enter the above into an SQL query in phpMyAdmin. Failing that, you may need to use your host's control panel to reset the password for your database user.

2006/11/16

exit, return, die

exit: terminate the program, it will return 0
exit(1): terminate the program, return 256;
exit(2): terminate the program, return 512;

die: terminate the program, return 65280;

return: return from a function, and it cannot be used outside function.

Note: If the program use multithreading and one thread died, then the whole program will not end until all other threads end.

2006/11/15

Spawning other program in perl

1. Backtick:
`system call or other program `;
No standard output of system call/other program can be shown on the current standard output, but standard error will be shown.
You can use a variable to hold the standard output, and then print it out. For example:
$stand_out = `system call or other program`, print “$stand_out”;

2. System ( )
system (“system call/other program”)
Both standard output and standard error of system call/other program will be shown on the current standard output.
If you use:
$result = system (“system call/other program”)
You will get $result = 0, when there is no error in system call/other program, otherwise, you will get strange number like 256/-1.

2006/11/14

Delete multiple files in Perl

Just found a way to delete useless files in a current directory.


foreach $file (<*.tmp>) { # step through a list of .tmp files
unlink($file) || warn "having trouble deleting $file: $!";
}


reference