Wednesday, August 26, 2009

Linux, PHP, and MSSQL Server

I don't know if this will work for everyone, but it took me 2 days to figure this out so maybe it will help you.

I wanted to connect to an external SQL Server 2000 database from a hosted Linux database. From the Linux box I was able to ping, telnet, and tsql the database server, but PHP would always throw a "unable to connect to database error".

PHP, in my case, uses FreeTDS to interface with MSSQL. My hosting provider has the default version of FreeTDS set to 5.0. After many hours of research I figured out that I needed to use version 7.0. So to get it to work I just set the version to 7.0 in my PHP script with the following line of code:


And that was all folks. (Remember that when you use mssql_connect with Linux that you want to probably add the port number to the host. e.g. mssql_connect(, $user, $pwd ) ).

Tuesday, August 18, 2009

How to Scrobble Internet Radio (Windows)

This is a step-by-step guide on how to scrobble internet radio using free apps:
  1. Download and install SqueezeCenter from Logitech
  2. Start SqueezeCenter (this automatically started for me)
  3. Open Winamp or iTunes and connect to http://localhost:9000/stream.mp3
    • In iTunes go to Advanced > Open Audio Stream...
    • In Winamp to go File > Play URL...
  4. Once you are connected, open SqueezeCenter (right click on the icon in the system tray and select "Open SqueezeCenter" (this will open in your browser)
  5. Press the settings button down in the bottom right corner
  6. Click on the "Advanced" tab
  7. Select " Audioscrobbler" from the drop-down menu
  8. Enter your credentials and make sure that both drop-downs are set to "Yes..."
  9. Click the "Apply" button at the bottom right
  10. Select the "Player" tab
  11. Select either Winamp or iTunes from the drop-down
  12. Select " Audioscrobbler" from the drop-down next to the player selection
  13. Enable scrobbling
  14. Click the "Apply" button at the bottom right
  15. Now you are set up to route internet radio through SqueezeCenter to your media player and have it scrobble...
  16. Close the "Settings..." portion of SqueezeCenter
  17. Leave iTunes/Winamp alone, go to the home page of SqueezeCenter
  18. Expand Internet Radio at the left
  19. Choose the station of your choice (I chose to search for a Boston station I like a lot)
  20. Push the play button on the station you choose
  21. Audio should start playing through iTunes/Winamp
  22. Booyeah you're done.
NOTE: If you get "chipmunk" sounding audio (I did), just press the stop button on iTunes/Winamp and then press play again. This fixed it for me.

Happy scrobbling.

Monday, July 20, 2009

EncryptedLocalStore may not use publisher IDs passed in from ADL

To prevent the "EncryptedLocalStore may not use publisher IDs passed in from ADL" error in your AIR application:

Friday, June 5, 2009

Adding Windows Home Server to a Domain

Follow the following steps to successfully add a WHS box to a Windows Server 2003 managed domain:

  1. Remote into your WHS box using the username "administrator" and the password you created when you set up the box.
  2. After logging into the box, right click "My Computer" and click on "Properties".
  3. Select the "Computer Name" tab.
  4. Click the "Change..." button next to "To rename this computer or join a domain, click Change".
  5. Click the "More..." button.
  6. Uncheck the "Change primary DNS suffix when domain membership changes" checkbox.
  7. Select the "Domain:" radio button.
  8. Enter your domain name.
  9. Click the "OK" button.
  10. Enter in the domain controller's Administrator account user name and password to join the domain.
  11. Restart the WHS box.
  12. You are now part of the domain.
Various notes:

  • Your firewall settings might have been changed during this process. If you are attempting to share files and printers you will want to make sure that the exception for such services is checked in your firewall settings.
  • If you are sharing files across subnets you will want to make sure you change the scope of the "File and Printer Sharing" exception to allow the associated subnets (I just set mine to any).
  • You might want to disable the SBCore service after doing this (some people on the forums have stated that it causes issues). You can do this by:
    1. Click on the "Start Menu".
    2. Select "Run...".
    3. Type "services.msc" and click "OK".
    4. Find the SBCore Services service and right click on it.
    5. Select "Properties".
    6. Click on the "Log On" tab.
    7. Select "Profile 1" from the hardware profiles.
    8. Click the "Disable" button.
    9. Click the "Apply" button.
    10. Restart the WHS box.
  • I never got the WHS connector to run on boxes that were on a different subnet. I really didn't try too hard as I really didn't need that functionality (I'm just sharing folders for a bigger server to utilize).
Hope this helps.