Archive for November, 2008

Importing Excel files into MySQL with PHP

If you have Excel files that need to be imported into MySQL, you can import them easily with PHP. First, you will need to download some prerequisites:
PHPExcelReader - http://sourceforge.net/projects/phpexcelreader/
Spreadsheet_Excel_Writer - http://pear.php.net/package/Spreadsheet_Excel_Writer
Once you’ve downloaded both items, upload them to your server. Your directory listing on your server should have two directories: Excel (from PHPExcelReader) [...]

Plesk: Upgrade to 8.4 causes “no such user” error in maillog

If you have a Plesk server where short mail names are enabled, upgrading to Plesk 8.4 can cause some issues. Valid logins may be rejected, and they’ll appear in your /usr/local/psa/var/log/maillog as “no such user”. You can correct the issue by switching to long mail names (click Server -> Mail in Plesk), or [...]

Viewing documentation for your ruby gems

As I get started with ruby, one of the things I’ve noticed is that ruby’s documentation could be a bit better.  However, I discovered that this four line ruby script will give your documentation for your server’s installed gems:

1
2
3
4
#!/usr/bin/env ruby
require "rubygems/server"
options = {:gemdir => Gem.dir, :port => 4242, :daemon => true}
Gem::Server::run(options)

Thanks to Daniel for the [...]

What is ’steal time’ in my sysstat output?

After running sar on my new slice from SliceHost*, I noticed a new column called steal. It’s generally very low on my virtual machine, and I’ve never seen it creep over 1-2%.
IBM’s definition of steal time is actually pretty good:
Steal time is the percentage of time a virtual CPU waits for a real CPU [...]

Syncing an iPhone with a new Mac without hassles

I know I usually talk about Linux server related topics on this blog, but I’m pretty proud of what I’ve figured out this morning on my Mac. As you know, the iPhone can really only fully sync with one machine, and if you want to connect it to a new Mac that you’ve purchased, [...]