Posts Tagged ‘google’

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

Is it Time to Uninstall Internet Explorer in the Enterprise?

August 13, 2009 1 comment

Enterprises and other large organizations tend to use Microsoft’s Internet Explorer as it’s free and comes bundled with the operating system. It’s a simple choice that requires little effort and provides a level of functionality that most users are completely satisfied with. Therefore, it appears to be a no-brainer for cash starved IT departments or those that are already using the Microsoft product portfolio.

However, Microsoft knows this and it’s all part of an elaborate marketing game that some enterprises are wising up to.

Read more…

The Demise of Apple

August 3, 2009 Leave a comment

My technology instincts tell me that the past few days have marked a turning point in Apple’s growth.

  • The furore over the removal of all Google Voice applications from the app store and the FCC’s resultant investigation.
  • The revelation of the security hole in the iPhone (and other cellphones) but Apple’s silence on the matter until they revealed a 280MB patch to fix it.
  • The stupidity of iTunes blocking the Palm Pre and Palm’s counter development to re-open it.
  • And today’s resignation of Eric Schmidt, Google’s CEO, from Apple’s board.

Apple has shown it’s arrogance, stupidity and proved that closed markets don’t work. It has elevated itself to a position where hackers are now targetting the platform and has reached the point of no return. Unfortunately, I only see the continued path downwards with one product after another starting to fail.

Microsoft have been attacked and criticized for their dominance and monopoly so I find it strange that any other company would want to mould itself the same way. Sure, the money’s good but it’s short-lived. Innovation is a far better business objective rather than profit. Profits should be a consequence of good innovation and Microsoft are only seeing this now. They know they’re losing out to Google and about to lose out in the future. Their browser market share is shrinking and it’s only a matter of months before Firefox eclipses Internet Explorer usage in Europe. The rest of the world will follow shortly as the World gets smarter and chooses a better browser.

I don’t understand why any sane observer would choose to follow the same path. Google is a dominant player with similar monopolies on key technologies but they’re not hated. Hackers don’t target them and their continual support of developers through the release of APIs, Google Code and tools continue to attract support. It is this continued path of open practices and support by the developer community that will pave a much stronger foundation into the future.

I would never write an iPhone application. Why would any developer spend so much time and effort developing for a platform that may never release the project? And even if they did there’s no guarantee that Apple wouldn’t change it’s mind and remove the application just as it did to all of those Google Voice applications. Apple now expects those developers to refund Apple’s customers because of Apple’s decision. I’m sure we can expect a lawsuit in the coming days.

Goodbye iPhone, thanks for the influence and innovation you gave to the market, we’ll take it from here though.

Categories: Uncategorized Tags: , , ,