Resetting Winsock LSP on Win Vista and Win 7

Uncategorized — Jeff Eske on September 3, 2010 at 10:46 am

1. Type in cmd, then CTRL+SHIFT+ENTER, to open the command prompt with elevated privileges

2. At the command prompt, type: netsh winsock reset.  This resets Windows’ Winsock to the default settings.

3. Restart to complete the reset.

Adding 32-bit Print Drivers to a 64-bit Windows 2008 R2 Server

Uncategorized — Jeff Eske on September 3, 2010 at 8:29 am

I have a new server that’s serving as a quasi-printer server and it’s running Windows 2008 R2.  The problem is that the server is 64-bit, so when I setup the printers on there and share them, it only has the 64-bit drivers to offer to the client machines.  I need it to be able to have the 32-bit drivers available for the client machines.   I did some searching and found a few different methods for adding the 32-bit drivers, but what’s described below worked for me.  The most important thing to realize, no matter what method you use, the driver names need to match exactly or it won’t work. Did you catch that? The names have to match exactly. I tried a couple of times, without success, before I realized that the names weren’t EXACT.  The 32-bit name had an extra space in it.  Anyway, to add the drivers:

1. Download and extract the 32-bit drivers on your local desktop machine.  Mine were HP printers, so I went out to HP and found the appropriate drivers and downloaded them.

2. Connect to the Printers and Faxes share on the server, using admin-level credentials.  I’m on XP, so I used the RUN command and typed in: \\servername to bring up the server’s shares, then double-clicked on the Printers and Faxes folder.

3. Look through the list of shared printers and note the exact name that it shows for the 64-bit printer drivers that it’s using.  You’ll need to double-check your 32-bit drivers to make sure that they end up with the exact same name.

4. On your local machine, go in to the individual .inf files for each driver and verify that the driver name listed in the file matches exactly with the 64-bit name on the server.  On mine, both were off slightly.  The 64-bit version was “HP LaserJet 4250 PCL6″ and the 32-bit was “HP LaserJet 4250 PCL 6″.  They’re the same, except for the space between the L and the 6.  The first couple of times I tried using it, it didn’t work.  It still said that the driver wasn’t available.  After I looked closer and saw that space and removed it, it worked perfectly.

5.  After you’ve ensured that your 32-bit printer driver names are correct in the .inf files, go back to your server’s Printer and Faxes share window.

6. While on that window, click on File > Server Properties.  This should bring up a popup.   Click on the third tab, the Drivers tab.  This should give you a list of the currently installed drivers, along with a row of buttons below that.

7.  Click on the Add button, and it will start the Add Printer Wizard.  Since you’ve already modified the .inf files to be correct, you should be good-to-go.  After you walk through the wizard, you should have the 32-bit drivers listed, along with the 64-bit drivers.  They should have exactly the same name.

8. To test it, try adding one of the shared printers to a client machine.  If it errors out and says that the driver isn’t available, then the names probably aren’t an exact match.

Oracle VirtualBox from the Commandline

Uncategorized — Jeff Eske on August 31, 2010 at 2:37 pm
To start a virtual machine “in the background” -
VBoxManage startvm “name_of_vm” –type vrdp
To shutdown a virtual machine -
VBoxManage controlvm “name_of_vm” poweroff

Running Apache and PHP on OS X 10.6.4

Uncategorized — Jeff Eske on August 31, 2010 at 2:19 pm

Apache and PHP are there, but not started.   To enable it:

1> Fire up terminal.app and cd /etc/apache2
2> sudo pico httpd.conf
3> Within httpd.conf, use ctrl-w and find LoadModule php
4> Uncomment LoadModule php5_module and LoadModule fastcgi_module lines
5> Right below that, add the following 2 lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

6> Save httpd.conf and close pico.

7> Goto System Preferences > Sharing and check the box for “Web Sharing”.

8> At this point, there should be a main machine website (http://localhost) and user(s) sites (http://localhost/~user)

9> Create a simple php file, containing the phpinfo() function, to see what is available within php.

All your post are belong to us

General — Jeff Eske on January 6, 2010 at 1:43 pm

A test post from my new DROID phone

Overcoming Terminal Server “Terminal server has exceeded maximum number of allowed connection” problem

Uncategorized — Jeff Eske on June 26, 2009 at 9:43 am

Since Windows server only gives you 2 remote connections, it’s easy to end up “locked out” of the server.  To overcome that, you can actually use a third remote connection that allows you to get in and kill the other offending connections.

On Linux type:

rdesktop -0 1.2.3.4

where 1.2.3.4 is the ip address of the server that you want to connect to.  Obviously, you need to have rdesktop installed and it should be a fairly recent version.

Mounting an external USB drive from the command line

Uncategorized — Jeff Eske on June 24, 2009 at 11:27 am

The easiest way to mount an external USB drive from the commandline is:

sudo mount -t ntfs-3g /dev/sdc1 /media/red -o umask=0000

This actually sets it up so that’s completely readable/writeable by anyone.

Manually Update Time Via ntpdate

Uncategorized — Jeff Eske on June 24, 2009 at 11:22 am

To update the server time, type:

sudo ntpdate -b pool.ntp.org

Fixing Adding New User to OpenDocMan

Uncategorized — Jeff Eske on June 12, 2009 at 12:10 pm

For me, OpenDocMan wouldn’t allow me to add new users.  It turns out that the SQL query was wrong.  Since the first field, id,  is set as ‘autoincrement’, it’s handled by the database directly, so there should be no reference to it in the query.  It may just be my installation that it doesn’t work on, I don’t know.  Anyway, here’s what I did to get it to work.  You need to remove a couple of things from one of the pages – commitchange.php

Firstly, change $query = “INSERT INTO user (id, username, password,etc.
to read

$query = “INSERT INTO user (username, password,etc.

Notice that id and the comma are removed.

Secondly, change VALUES(”, ‘”. addslashes($_POST[

to read

VALUES( ‘”. addslashes($_POST[

Notice that the single quotes and comma are removed, just after the parentheses.

To Manually Reset the Admin Password in WordPress

Uncategorized — Jeff Eske on June 12, 2009 at 11:27 am

In case of Brain-fart, use the instructions below to reset the admin password in WordPress.  It needs to be done through phpMyAdmin, MySQL query browser, or some such place that allows you to run SQL commands.

update wordpress.wp_users
set user_pass = MD5(‘new_password’)
where user_login = ‘admin’

Next Page »
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff’s Blog