OpenSSL Error in PHP

December 7, 2009 1 comment

I decided to play with Swiftmailer, the successor to phpMailer, but wanted to try something different — I wanted to use TLS. I was trying to setup a piece of test code for an internal project and just couldn’t get it to work in the office so I decided to try it from home as I had fewer variables to trip me up, i.e. no firewalls or hardened mail servers to play with.

I installed XAMPP v1.7.2 on my Windows PC which gave me PHP v5.3.0 with OpenSSL v0.9.8k. It also gave me TLS support as ‘Registered Stream Socket Transports’ on the PHPINFO() page said I had ‘tcp, udp, ssl, sslv3, sslv2, tls’ available. I then used a simple piece of code:

require_once 'lib/swift_required.php';

// Setup the mail transport
$transport = Swift_SmtpTransport::newInstance ('', 587, 'tls');
$transport->setUsername ('{username}');
$transport->setPassword ('{password}');

// Setup the mailer
$mailer = Swift_Mailer::newInstance ($transport);

// Build the message
$message = Swift_Message::newInstance();
$message->setSubject ('Testing');
$message->setFrom (array('{username}' => 'Test Sender'));
$message->setTo (array('{email address}' => 'Test Recipient'));
$message->setBody ('Here is the test message.');

//Send the message
$result = $mailer->send ($message);

You’ll have to change the {username}, {password} and {email address} though to make it work for you. And then I ran it.

BANG! — It failed with a cryptic error message “SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number”.

I Googled for an hour and found post after post but I got it in the end. It appears to be a version difference between the client and server, the PHP code is running SSL v3 whereas Google Mail is looking for SSL v2. If I changed the port from 587 to 465 it all went away though.

BTW The other tool I used to play with TLS was SendEmail, a command-line utility for sending emails. The following command worked perfectly for me on port 587 (annoyingly). It all needs to be on one line.

sendemail -f {username} -t {email address} -u Testing
-m "This is a test message." -s 
-xu {username} -xp {password} -o tls=yes

Bobby Joe Blythe – Latest News Update

September 9, 2009 Leave a comment

It seems the Bobby Joe Blythe karate dojo video case hasn’t died yet and is still bubbling under the Internet’s radar.

The Justice 4 Kung Fu Guy site just tweeted that Inside Nova have published another story today about the case and it’s a bit of a turn about face.

“Police originally said that [Kung Fu Guy wasn’t killed]. Now they aren’t so sure, Prince William police Maj. Ray Colgan said.”

Another victim has been traced and he only recalls waking up in an ambulance after being invited to the dojo to display his fighting skills.

The story also states that police are now investigating Blythe and looking for other victims or witnesses. They also state that they’re not completely sure that the assailant was Willie J Dennis.

Why Aren’t Children Taught to Touch-Type at School?

September 8, 2009 Leave a comment

Interesting article at the Telegraph asking why don’t we teach touch-typing at school these days.

I think the short answer is because the school system hasn’t worked out how to add computer skills into the Dickensian curriculum and approach to learning we’ve embraced.

Firstly, I think touch-typing vs typing are two different skills. Touch typing and the QWERTY keyboard used in English speaking countries were developed to deal with the limitations of the typewriter and the mechanical innards of it. Therefore, you needed to be able to push down hard with your pinky fingers to press the ‘p’ key on to the page. It was also important to spread the keys around so we didn’t have multiple levers clashing in midstream.

Read more…

Willie J Dennis Witch Hunt Continues

September 5, 2009 9 comments

Bullshido are now mounting a campaign to have Willie J Dennis’ application for termination of his probation to be denied. Dennis is currently on an unrelated charge in Broward County, FL and has applied to have his probation terminated early. Bullshido are using the Blythe video as evidence against him and asking the members of the site to write to the judge and ask him to deny the application.

I don’t believe this is justice, I believe this is a witch hunt.

Firstly, the crime depicted on the video is heinous and certainly criminal. However, Dennis’ role in it needs to be understood. Yes, he stomped on the guy but there are probably mitigating circumstances. For example, did he think it was a challenge match? Did Blythe instruct Dennis to disable him in such a violent manner? Was this just one incident caught on tape but fitted into an overall pattern? Blythe said Dennis paid for his ineptitude for the following week and said he another ‘Fight for Life’ video which was even better. Therefore, did Dennis truly act on his own.

When a vicious dog attacks a child, we blame the owner and the training it received. Therefore, it seems wrong to use video evidence in one case when making decisions about another case when the background and surrounding facts of that video have not been established.

Every case has to be tried on its merits. Other cases should only be taken into account if they have been similarly investigated, presented to a jury of our peers and a judgement made. Punishing Dennis just because he’s in the system is the wrong approach, in my humble opinion.

To me, justice means collecting information and passing it to the legal system to act upon or ignore. A witch hunt, or vigilantism is taking this information and acting upon it yourself. I would like Blythe, Dennis and every other member of the audience charged over this video but I want law enforcement to gather the evidence, see it presented in a court of law where the facts can be established and a judgement made.

Blythe appears as though he ran his dojo with a rod of iron and whatever he said, he expected others to do or they’d face the consequences. Dennis, being an ex-military man, is likely to understand that hierarchy and simply follow orders almost blindly. I get the impression from this case that Dennis was just the puppet and the consequences of not following Blythe’s orders were far greater than beating a vagrant to near death.

Imagine a group of 7 friends in a circle with 1 outsider in the middle. The leader of the group gives another a baseball bat and tells him to beat the guy, or else. Everybody else starts chanting and encouraging the guy with the bat to start swinging. Who’s really at fault here? They all are, but the guy with the bat is not necessarily the worst one, at least he had a few excuses. Everybody was goading him or pressuring him to act. His leader was telling him to do it, or else. Nobody else had an excuse.

Ultimately, I want to see justice but I want to see due process being followed. I don’t want to see them burned, hung or beaten to death, I want to see them brought to a courtroom where they have to account for their actions on this day. The jury can then decide what to do and who was more culpable than everybody else. Trying to subvert the justice system to punish Dennis today is wrong, that’s not how due process works. Due process means putting him on a charge for this crime.

If the justice system fails and the decision doesn’t feel right, do something about it, modify the system. Maybe statute of limitations should be based on when the evidence comes to light rather than when it occurred. Video will always allow us to see past crimes. If we want a justice system that makes us feel protected and that encourages us to act responsibly, rather than reprehensibly, we have to adapt it to deal with this incident.

Problems with Nofollow

September 3, 2009 Leave a comment

TechCrunch reported today that Digg is now adding the rel=”nofollow” tag to sites it doesn’t trust. I see some problems but lets have a little primer.

If a website, say the BBC News ( links to another site, say Fred’s Auto Shop (, because it’s relevant to the story then Google will think more highly of Fred’s Auto Shop because if the BBC is linking to it, it must be important. So a little Google love is passed from the BBC page to Fred’s site, this is the principle behind Google and its PageRank algorithm. Basically, a site’s reputation is based on the number and quality of the inbound links to it.

Unfortunately, spammers realized that if they could also get their links on to these high-ranking pages they too could get some Google love and promote their own sites full of spyware, cheap medication or other dubious items.

So Google came up with the NoFollow attribute and encouraged people to use it in public areas such as blog comments so that spammers gain no benefit. Wikipedia uses NoFollow on all of its links and Digg is about to use it on sites it doesn’t trust.

For Wikipedia I find that disturbing. As an encyclopedia it’s supposed to be an authoritative page of information and therefore anything a page links to is likely to be a valuable source of information. Therefore, Google should be using this to measure the reputation of the linked page.

As for Digg, how will Digg know which sites to trust? Why will they be any better than Google at sifting the good from the bad. Ultimately, they will only have one set of data to base their judgement upon, i.e. the database behind Digg, a user’s activity on the site, how many domains they’ve linked to, number of comments with a single link in, etc. Spam detection works better when you have a larger pool of data, one that crosses multiple business sectors, languages and domains. Therefore, Digg should just use NoFollow everywhere … but only if we don’t strictly interpret the NoFollow attribute.

If NoFollow is strictly interpreted, it’s wrong as you’re penalizing good links because of the few bad ones. A maxim that’s never worked in any aspect of life.

If it’s interpreted as ‘this link is user submitted and may be spam’ that’s better. It means we can be wary of this link and maybe we don’t award all of the Google love the moment we see it, maybe we cross-reference other sources and see if it fits into a pattern of abuse. If high-ranking sites are linking to this page without NoFollow and a few are linking with NoFollow, then it’s probably safe to ignore the NoFollow attribute for this link. However, if you only have NoFollow links pointing to a page, it’s more likely to be spam. Factoring in details about the domain, the timespan from the first awareness of this link to the last should also enable a more accurate prediction to be made and identify spam.

With the amount of data Google has it should be able to use this information wisely and be able to more accurately assess the SpamRank (my idea!) of the linked page.

I think the ‘NoFollow’ name is a bad idea and would have been better if it was called ‘UserGenerated’ instead or something similar. I see the value and I trust Google to use the information in a logical manner but if Digg added its own ‘trust’ algorithm to the site, it’s basically nothing more than a PageRank sculpting mechanism however noble it seems. Out of interest, I see Reddit doesn’t use the NoFollow at all for user comments, which again is probably a bad idea.

Bobby Joe Blythe – Case Closed?

August 31, 2009 11 comments

The Washington Post published a story yesterday about the “Jesus Taught Me” video and says there’s nothing to it. The article by Josh White states that “the case isn’t cold, and the man wasn’t killed.” He then adds, “The viral video is another example of what can happen so easily on the Internet, with sketchy information leading to wild speculation — and wild-goose chases for police.”

A retired police detective, Chuck Feldbush, says he met the victim a few days later and even though he had clearly been beaten he chose not to pursue charges. He also said that the video didn’t surface until the 1990s otherwise they’d have taken it as far as they could.

The story fundamentally says that the case is closed, there’s nothing to see and we should all move on.

If that’s true and there is nothing to see can the district attorney please release a statement to that effect.

I didn’t see a video of an alleged murder and a police cover-up.

What I saw was a video of man critically injured by another man with the consent of the dojo owner. I also saw a few others standing by and watching it all unfold, encouraging the attack the continue and then sweeping it all under the carpet as if it was acceptable.

The video has been distributed by Blythe over the past 25 years to a few friends, shown several times and Blythe’s own comments said this guy had his “clock stopped”. Blythe also said there was another video titled ‘Fight for Life’ that he had and others have said this sort of brutality was common practice for Blythe and his way of testing his bodybuards and black belts.

What I witnessed was an attempted murder of somebody regarded as a worthless human being for nothing more than entertainment pleasure. To me, this whole incident is akin to a dog fight with a willing audience all actively participating and being complicit in the crime. On two occasions, members of the audience push the guy back into the fight. On another occasion a woman shouts “TV! TV!” when they approach the TV in the room, clearly more concerned about the TV than the health of the worthless man.

And nobody wants to charge anybody else for this.

It was Martin Luther King Jr that said “justice denied anywhere diminishes justice everywhere” and is emblazoned on the Justice4KungFuGuy website but it sums up the position for me too. If people can do this, video it, brag about it for 25 years and we do nothing, we condone it. We are saying that this is acceptable.

Michael Vick was sentenced to 23 months in jail for dog fighting. Are we really saying that was more heinous than this crime? How many other guys were beaten by Blythe’s students? How many more videos were recorded and shown to his friends and family? Where is the ‘Fight for Life’ video Blythe boasts about as being even better?

I don’t see this was a wild-goose chase, any more than the pursuit of Nazi war criminals 60 years after the fact. I see it as an opportunity to right a wrong and send a message that this is not acceptable. Blythe and his cohorts got away with this crime, isn’t this what people really find disgusting about this case? All of those hundreds of people that visit this site and read these articles feel disgusted. They want to know what happened and find it unsettling when their value system is knocked off balance by a story like this. We want that balance restored, we want to believe that our justice system works and is effective. We want to know that our faith in the system is well-founded and that our own perception of what’s right and wrong is accurate.

What we really want, is to feel better about this. We want somebody, somewhere, to tell Blythe and his cohorts that this is unacceptable.

UPDATE: There’s also another site pursuing justice for this crime –

Bobby J Blythe – New Video

August 25, 2009 3 comments

NOTE: Go to Justice4KungFuGuy for the latest news on this story.

Another new video has appeared on YouTube showing one of Bobby Joe Blythe’s lectures to three black belt students. In the 9:56 video, it shows Bobby Joe Blythe seated at a makeshift desk talking to three black belts in the same dojo where the infamous KFG (Kung Fu Guy) was brutally beaten.

Although the video is a little blurry and the guys are far from the camera it appears the man stood next to Bobby Joe Blythe is the same Willie J Dennis that beat KFG to a bleeding, wheezing pulp. However, it’s clear from the audio what rules Blythe operated his dojo under. He clearly outlines his expectations of his black belts and his rules of what happens in the dojo.

“If they come through that door, it’s open season.”

“I do what I want in my home. I do what I want in my place of business.”

“Now, if a person wises off to you … just hit him. No questions asked. Hit him. Don’t explain your actions. Hit him.”

“If any person touches you, in any way, he’s either a faggot or he’s stupid. Hit him.”

At the end of the video Blythe tirades about earrings, how they’re not allowed in his dojo and that if he ever catches anybody wearing one, that’s the day you will lose your black belt status. He even promises to beat you for it.

To all intents and purposes, this new video seems to be nothing more than a glimpse into the world of Bobby J Blythe and how not only he taught karate in his insane dojo (his words) but how he intended to maintain his dojo’s reputation. If you compare the misguided teachings in this video to that of a misguided Muslim leader at a Pakistani madras you can see how corrupting his words can be. He almost says that any black belt has earned the right to do what they want because they worked their butt off. I think this video further solidifies my own view that Blythe created Dennis, his warped idea of what was right and wrong, wound him up like a clockwork toy and pointed him at KFG.

KFG touched Dennis, his kicks and punches did connect. He also knocked Dennis to the floor. So what was Dennis expected to do? He couldn’t lose face. He couldn’t become a faggot and he certainly wasn’t stupid so he did what Blythe had trained him to do. He hit him. Repeatedly. Brutally. Until KFG was dead or dying.

Blythe incited hatred and incited violence against any inferior being, i.e. somebody that didn’t have a black belt, just as a madras preacher would against the infidel. As an ex-marine he would probably be aware of these psychological techniques though and would prey upon simpler minds but now he’s been caught. If Blythe had not kept these videos for his own trophy cabinet he’d probably be in the clear. His arrogance against the rest of the world and the simpletons that populate it are just cannon fodder to him. I’m sure to this day that he doesn’t see anything wrong in what he said, did or incited others to do.

UPDATE1: Associated Content has also written up a detailed account of the incident and video but seems to add little detail compared to other sources. However, I’m pleased the story is garnering more media attention.

UPDATE2: The Examiner has now published a story too.

UPDATE3: I don’t like that the story seems to be going cold and I think it’s because it’s not easy to see where we’re at and what’s going on. So is born.