arthur.wiebe Where a keyboard takes the form of an idea

29Dec/110

Tip: Error Connecting to MySQL Socket on Localhost

I am doing development on my Mac (running Mac OS X 10.7 (Lion)) and I've installed MySQL 64-bit from mysql.com.

So I'm writing an application, and get to the point of testing my first MySQL query from the app. And guess what! If fails with this message:

PHP Warning:  PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in ...library/Zend/Db/Adapter/Pdo/Abstract.php on line 129

So I'm racking my brain, as the MySQL server is running just fine. I can connect to it by executing "/usr/local/mysql/bin/mysql -u root" from a Terminal.

The solution!

You are probably connecting to the MySQL service using "localhost". Change that to "127.0.0.1". Basically what's happened is if you use localhost PDO will want to connect via socket. If you use an IP address PDO will use the TCP/IP layer to connect to MySQL.

Otherwise you can change the path to the socket, but I find it much easier to use TCP/IP, especially for development. Not to mention our production servers use TCP for the MySQL connections as well.

Hope this tip helps someone coming across the same thing. It probably happens often for people doing development on a Mac.

Filed under: Technical No Comments
29Nov/110

Macbook Pro – No Low Battery Warning

I have a Macbook Pro 15" which is the late 2008 model. It's been having an issue for some time now, at least a few weeks. And this issue seems to be new as a result of my upgrade to Mac OS X Lion (OS X 10.7). I'm not sure if it's related to the 10.7.1 or 10.7.2 updates or not.

Either way the issue is when the battery is low, instead of prompting saying your battery is low, please plug it in, there is no warning at all. It just goes right into sleep mode. Fortunately the amazing thing is nothing is lost, everything is saved. Even if you're copying files to a USB drive, as soon as you plug it in to power, and wake it from sleep mode the data starts copying again.

Anyway, the solution! The solution is in this screenshot.

The simple solution is to open System Preferences (which can be done from the Apple menu on the top left) then open Energy Saver. And then click on Restore Defaults. As soon as I restored defaults when the battery got low, I once again received the warning, which I'm sure will save a lot of frustration going forward!

Hope this helps someone out there!

Filed under: Technical No Comments
1Feb/111

LTSP 5.2 and Ubuntu 10.04 – Sound without a Sound Card

A little tip for anyone struggling with the same issue.

I am running LTSP with Ubuntu on VMware ESXi 4.1 and as you may know it does not have the ability to create a sound card device for the virtual machine.
Not sure if that's the only issue, but none of my thin clients were getting audio.

So here's what I had to do and it worked without a hitch:

Install alsaplayer-esd on the LTSP server:

sudo apt-get install alsaplayer-esd

Also make sure in your lts.conf you have Sound set to True.

Hope this helps someone else on the big wide internet!

Tagged as: , , 1 Comment
20Nov/100

Settlements are the Greatest Thing that’s ever Happened to the Middle East

I do want to state a few facts that you're never going to hear on CNN.
What actually happened when the Jewish people started settling the lands of Judea, Samaria and Gaza. The average Arab income tripled--so did their birth rate. The average Arab income in Gaza grew 20 fold. 2,500 factories were built. Seven universities were established. And the life expectancy almost doubled, jumping from 40 to 70.
Are the settlements the problem? The settlements are the greatest thing that's ever happened to the Middle East. -- Jeremy Gimpel

31Mar/100

“Turning Jerusalem into a Jewish City”

  • Jerusalem was first settled in 3500 BCE and known as Rusalimum according to Egyptian writings.
  • In 1003 BCE King David established Jerusalem as the capital of the kingdom of Israel.
  • In 164 BCE the Maccabee's recaptured Jerusalem and restored the temple.
  • Jerusalem is mentioned in 767 versus of the Bible.

........
Muhammad was born in 570 CE. and Islam didn't come until around 620.

...............

2010 CE I  am reading some of the headlines and come across this again for like the 100th time:

Israel's objective is to "turn Jerusalem into a Jewish city," the Hezbollah leader said.

OK, there's three possible responses I could have:

  1. Laugh out loud. In fact laugh so hard I start to cry.
  2. Become angry with the disgusting nature of these lies, and where they come from.
  3. Understand what the bigger picture is, reach a logical understanding, and move on.

I don't fully understand the bigger picture yet. And cannot come to any logical conclusion. Except for the fact that there is a spiritual war going on. I know who will win, but this is just another reminder of the propaganda being spread across the media by Islamic idealist. And the ideal world of Islam consists of many millions of dead Christians and Jews.

What is my message? Find the truth, things are never as they seem.

19Feb/100

SSH Server And “Permission denied (publickey).”

This drove me up a wall, yet it's so simple, and so easy to overlook.

If you ever setup a server with SSH public key authentication, and you get the following error:

Permission denied (publickey).

Make sure you do the following:

  • Make sure the permissions of the .ssh folder are 0700
  • Make sure the permissions of the authorized_keys file are 0600
  • Make sure the user owns the .ssh folder and contents (normally that's the case but just to make sure)

For example from the home folder of the user you are trying to setup, use these commands:

sudo chown -R username:username /home/username/.ssh
sudo chmod 0700 /home/username/.ssh
sudo chmod 0600 /home/username/.ssh/authorized_keys

Especially if you're on Amazon EC2 which uses public key authentication by default, this is very important when setting up new users. And with modern Linux distros like Ubuntu this is very easy.

Happy secure terminalling!

11Feb/102

2010 Winter Games Live Streaming Requires Silverlight

Just when I thought the internet was headed to good pasture, I check out what internet streaming is going on for the 2010 Olympic Winter games here in Vancouver. What shall I find? But low and behold.. And I mean low. They are streaming using Microsoft Silverlight.

Until now I have refused to install it, I'll probably end up installing it just for this and uninstalling it right after. But hey, they are streaming in 720p HD which is not bad. And I believe it's even using H.264 so not a Microsoft specific codec. But still, I just don't like it! This is bad for the open web, and bad for the non-Microsoft web. I know very well what Microsoft's plan was for the internet. Thanks for the likes of Mozilla, Google, and Apple their plans have been thwarted. I just hope it continues.

1Feb/100

The family was telephoned and urged to leave

The destroyed Abu Askar family house was used to store Grad rockets. The family was telephoned and urged to leave before the house was shelled. - The Goldstoning of Israel.

I feel compelled to write this short post, hopefully to help spread the information for anyone who even thinks about believing the goldstone report. Those who wrote the report had made their decision before even beginning the inquiry.

It's anti-Semitic, and intentionally sides with the terrorists.

Going back to the first sentence in the post, what other army in the world, let alone the small pocket of the world called the middle east, would call their target allowing them to escape, before launching the attack? Something Israel has done countless times in an mind boggling effort to save civilian lives.

"The Goldstone Report was born in bias and matured into a full-fledged miscarriage of justice."

Who Else Thinks So?

Those are just a few.

25Jan/100

Did You Know? – Episode #2

I've managed to get a recording together for a second episode of the Did You Know podcast. This time we have Isaak along for the ride, and he brings some more interesting facts about the human body, and more.

On a side note, please forgive the production quality. I was experimenting a bit too much with this episode. First both of us were recording live using the same microphone so editing turned out to be difficult, and then I was working with new software which I still am not used to. Anyway, enjoy!

http://media.artooro.com/podcast/Did_You_Know_-_Episode_2.m4a

[Download iTunes File]

15Jan/106

ESET Antivirus (NOD32) for Mac OS X Update

On December 6th I wrote a short little post about ESET NOD32 Antivirus 4 Beta for Mac OS X. On January 08 2010 they released an updated build which has the following changelog:

- Fixed GUI failure that had occurred in some cases during configuration imports
- System font warnings no longer display
- Added advanced "About" window and "Splash" screen
- Added information windows about detected and cleaned infiltrations
- Support for selection of multiple items from lists

So compared to my last post, have any of the issues I addressed changed? No they haven't. So let me go through my experiences with this new build.

USB and Other Removable Drives

When attempting to eject (or unmount) a removable USB drive, you get a message saying "The disk "XXXX" wasn't ejected because one or more programs may be using it.
To eject the disk immediately, click on the Force Eject button."

The you can either Cancel or Force Eject.

This issue only occurs when running NOD32, otherwise drives work just fine. Also in certain situations the mounting of drives including network shares can be quite time consuming.

TrueCrypt

I am a heavy TrueCrypt user. When attempting to mount a TrueCrypt volume (I mostly use container or file based volumes) the following error message occurs:

"hdiutil: attach failed - Permission denied"

I also mentioned this error in my previous blog post, and also submitted a ticket to ESET about this. No response.

More...

Of course there are other things we could talk about as well. I still strongly desire that there be a way to remove the system menu icon. There's already a Dock icon and there should be a way to disable either one of them. At least a way to disable the menu bar icon as it just takes unnecessary space.

Also disabling the real-time protection still does not require administrator authentication. Even if you are logged in as an administrator user you should still be prompted for your password to disable real-time protection.

And one more thing, the uninstaller is not user friendly. Which of course I was forced to do again as without TrueCrypt I'm toast. The uninstaller actually launched a command line script and you're prompted for your password from a terminal window. This is not something I would expect a normal user to do, and it would be a 15min task to bundle that script into a package just like the installer. Even an applescript bundle is better than that.

So that's it. I still say good on ESET for doing this, but c'mon, listen to the people who actually use and sell your product.

Update [2010-01-18]

Just got a response from ESET on these issues, and quoting it here:

Thank you for your feedback on our EAV4 beta version for Mac OS. The updates installation package was released to quickly address some most important issues. It is not meant as the next beta version release which will contain more fixes.
Several issues mentioned in your articles are already known to us (dock and menu icon, TrueCrypt error) and will be fixed in the future.
.....

Thanks for the response, and hopefully once the TrueCrypt problem is fixed I can continue testing the product.

13Jan/105

R1Soft Versus Bacula

When implementing a backup system for a network of Windows servers I evaluated R1Soft and Bacula, and thought it might be nice to share some thoughts here on the amazing blog! :)

So, the main differences. As of now R1Soft is $348 (up from $180 two weeks ago). Bacula is free and completely open source with an option of commercial support.
R1Soft has a very nice web interface for managing all the systems, and setup configuration is extremely easy.

Also the Bacula server (storage and director) component is not supported on Windows. Only on Linux/UNIX systems. But it works as that's what I'm running currently with Bacula 3.0.3a.

Bacula has many of the same features as R1Soft, but the fact that everything is configured through text configuration files can be a turn-off for some people as it is quite a learning curve. If you just want to get it done without a fuss, R1Soft is your choice. In my case I decided to save a few thousand dollars by learning Bacula and implementing it.

Also Bacula stores the backups in monster volume files while R1Soft uses a more file based structure which I do prefer. Although performance does seems to actually be better with Bacula during a backup.

Overall I decided to go to Bacula solely on price. If R1Soft was still at $180/agent I would have seriously considered going with them because of official Windows server support and awesome web gui interface. But free software won again, despite the initial challenge of learning a new configuration file specification.

I might have to teach a course now to make some ROI for learning the stuff.

9Jan/100

Did You Know? – Episode #1

This is of course our first episode of the Did You Know podcast. It's goal is very simple, we just have not completely determined it yet. So for now it's for you to gain a better insight into the truth behind the routine curtain.