tips and tricks for web developers & designers, and system & network admins

not-sexy.com

PushPrinterConnections.exe is not a valid win32 application

January 13, 2009 | work, windows, printing, group policy | 4:05 pm | Comments [0] |

As part of our migration from SBS2k3 to SBS2k8 (and a completely different domain) I elected to move all of our printers to a central print server and push them out to the client PCs via a group policy rather than manually walking to each PC and setting each printer up. For non-Vista PCs, this requires the client to run PushPrinterConnections.exe on startup (or login, depending on how you set up your GP) to actually set up the printers.

In a typically Microsoft fashion, the gurus at Redmond ignored the feedback on the beta SBS 2008 forums and neglected to put an i386 version of PPC.exe on the x64 server installations, and as none of our client PCs run 64bit Windows XP, this caused some problems (read: nothing worked). (more…)


Backup individual registry keys to file from command line

October 8, 2008 | windows, backup, registry | 12:23 pm | Comments [0] |

While setting up some backup scripts for a windows server (using NasBackup - go go gadget free plug) I realized I should also be backing up certain registry keys to go along with the files. Clearly a solution that could be initiated from command line (in a bash batch script as I can’t write VBscript and don’t want to learn) would be the best option.

(more…)


How to add a column to a mysql 5 table only if the column does not already exist

September 16, 2008 | work, mysql | 5:02 pm | Comments [0] |

The situation is this: You are running a database update script, and you need to add an additional field to a table in a way such that the script will not fail if the column already exists (from a previous update etc.). Most people would simply use a php script to get the layout of the table and then only execute the ALTER TABLE command if the column does not already exist, but sometimes we are bound by scripting restrictions, so here is the SQL code to do it:
(more…)


FTP Problems - netout: Broken pipe 550 can’t access file.

September 1, 2008 | work, windows, backup, ftp | 9:17 am | Comments [0] |

Over the weekend, one of my backup scripts started erroring out while sending the backups offsite to an FTP server. The error message was:

200 Port command successful
150 Opening data channel for file transfer.
netout: Broken pipe
550 can't access file.

(more…)


BIND: ‘RRset exists (value dependent)’ prerequisite not satisfied (NXRRSET)

August 18, 2008 | work, linux, security, bind | 10:26 am | Comments [0] |

I was recently checking through Splunk when I came across these messages in the logs of one of my servers:

Oct 7 20:59:33 web named[13698]: client 111.222.333.444#50389: updating zone ‘domain.com/IN’: update failed: ‘RRset exists (value dependent)’ prerequisite not satisfied (NXRRSET)
Oct 7 20:59:34 web named[13698]: client 111.222.333.444#50392: update ‘domain.com/IN’ denied
Oct 7 21:59:35 web named[13698]: client 111.222.333.444#50422: updating zone ‘domain.com/IN’: update failed: ‘RRset exists (value dependent)’ prerequisite not satisfied (NXRRSET)
Oct 7 21:59:35 web named[13698]: client 111.222.333.444#50425: update ‘domain.com/IN’ denied
Oct 7 22:59:20 web named[13698]: client 111.222.333.444#50458: updating zone ‘domain.com/IN’: update failed: ‘RRset exists (value dependent)’ prerequisite not satisfied (NXRRSET)

(more…)


IIS Manager Snap-in is blank

January 25, 2008 | work, iis, windows | 1:15 pm | Comments [0] |

Sometimes IIS manager takes 10-20 seconds to load, and when it is finally loaded it has no server connected (and therefore no websites). Apparently this is fairly common on Sharepoint 2007 servers, and the fix is to restart the sharepoint timer service, but I do not run sharepoint.

As a side effect of this problem with IIS, my HELM 4 control panel stops responding, possibly because it is in its own application pool. In the past I have had to reboot the server to get everything working again, but I can’t keep doing that with a production server. Restarting the IIS Admin service in Service Manager hangs and eventually fails trying to stop the World Wide Web Publishing service.

(more…)


PHP on Windows not using correct php.ini file

January 8, 2008 | work, php, iis, windows | 3:25 pm | Comments [0] |

I just installed PHP 5 on a windows 2003 server running IIS 6 and found that none of my extentions were loading correctly. Upon further inspection of the phpinfo() command, I found the following:


Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File (none)

So PHP had decided not to use the php.ini file that was located in the working directory, but rather attempt to use one from C:\Windows, and because it could not find one there it was using the default setup. Initially I put a symlink from c:\windows\php.ini to the real php.ini file, but that did not appear to work either.

(more…)


how to rebuild software RAID1 on linux

March 14, 2007 | work, linux, raid | 9:35 am | Comments [0] |

Ok, so you have done the right thing and set up your linux server (or desktop) with software RAID1 on all partitions, but when a hard drive dies, how do you actually recover the system with minimal downtime? Elementary my dear Watson, read on and learn! (more…)


email from my server is failing sender verify tests

March 8, 2007 | work, linux, security, exim | 2:39 pm | Comments [0] |

The other day a customer contacted us to say that he was trying to send email from several accounts on one of our servers to an account on another server and it was bouncing back with the following error:

foo@remoteserver.com
Delay reason: SMTP error from remote mail server after RCPT TO::
host remoteserver.com [xxx.xxx.xxx.xxx]: 451 Could not complete sender verify callout

Now I know that our server is fully RFC complient, and the remote server should have no problems performing a sender-verify lookup on any of the ending email addresses. After a bit of poking around and fiddling with exim, I discovered that one of the spam blacklists we used had been taken offline (ordb.org) and when the remote server tried to do a sender verify lookup against our server, the sender-verify connection was timing out before our server finished checking if the remote server was in any blocklists due to the lookup to ordb.org timing out.

A handy little tip for anyone having unexplained sender-verify problems from an otherwise fine exim setup.


how to use parked domains as addon domains

For those not familiar with the terminology:

- http://en.wikipedia.org/wiki/Domain_parking

Many web hosts limit the number of additional domains you can have on an account, however they usually allow you to park any domain you want, regardless of the addon domains limit. Simply place this code in your .htaccess file, and you will be able to use any parked domain exactly like an addon domain.

RewriteCond %{HTTP_HOST} ^www\.vhost\.com$
RewriteRule ^/$ /vhost/$1 [L]

Happy Webmastering :)


Next Page »