Thursday, October 12, 2006
mySQL natural number ordering
ORDER BY LENGTH(groupField) ASC, groupField ASC
now the ordering is as you'd expect from a user standpoint.
Thursday, September 14, 2006
IE doesn't show option text when dynamically creating an optgroup
select_obj = document.getElementById('my_select_box_id');
optgroup_obj = document.createElement('optgroup');
option_obj = document.createElement('option');
option_obj.label = 'option label';
option_obj.value = 'option value';
if ( typeof(option_obj.innerText) != 'undefined' ) {
option_obj.innerText = 'option label';
}
else {
option_obj.text = 'option label';
}
optgroup_obj.appendChild(option_obj);
select_obj.appendChild( optgroup_obj );
Sunday, July 16, 2006
IMP Error connecting to IMAP server. 22 : Invalid argument.
cd /usr/ports/lang/php4
make config
-> check the "Build OpenSSL statically" option
make clean
make
make deinstall
make reinstall
horde sidebar menu hangs on login after turba configuration
if ( Util::extensionExists('ldap')) {
to
if ( false && Util::extensionExists('ldap')) {
in config/turba/sources.php and it now works perfectly.
Friday, April 07, 2006
InnoDB table creation fails after an improperly dropped table
Friday, March 24, 2006
Windows Explorer freezes when video files are in the folder you're viewing
NOTE: before doing this, you should make a backup of your registry by going to start->run, typing regedt32 , then going to File > Export and saving the registry file somewhere safe.
1. Click Start
2. Click Run
3. Type: regedt32
4. Browse to the registry key (the things that look like folders on the left side of the screen) HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler.
5. Delete the Key on the right hand side called "default" by right-clicking and hitting "Delete".
That should be it. If that doesn't work, the following command might help, but it will disable all AVI thumbnail preview capability:
go to Start > Run, type: REGSVR32 /U SHMEDIA.DLL and press OK. To undo this change, simply go to Start > Run, type: REGSVR32 SHMEDIA.DLL and press OK.
Tuesday, December 06, 2005
ACT 2005 Install fails on SQLHotfix818.exe on Small Business Server 2003
1. Go to Add/Remove Programs and remove any references to MS SQL Desktop Engine (including SharePoint and SBSMonitoring, you can reinstall these if you need them. If you actively use either, make sure you have a backup!).
2. Rename C:\Program Files\Microsoft SQL Server to something else, so the ACT install can't find it.
3. Make sure the SYSTEM user has full access to the C:\ drive (per ACT KB article #16478)
4. Make sure all services that start with MSSQL$ are stopped (Start -> Administrative Tools -> Services)
5. If ACT is installed, uninstall it.
6. Now install ACT, and you should be good to go.
Monday, December 05, 2005
Horde/IMP won't create sent mail folder. This is what the server said: Invalid mailbox name
under $servers['imap'] (or whatever server you're using - 'imap' is the default - change the namespace and folder lines to read:
'folders' => 'INBOX.',
'namespace' => '',
Note the trailing dot after INBOX. Then you have to LOG OUT AND LOG BACK IN before the changes will take effect. The docs suggest that these options should be the other way around for Courier-IMAP, but it doesn't seem to work that way.
Thursday, September 22, 2005
Changing file associations in windows as a non administrator user
Option Explicit
Dim objShell
set objShell = WScript.CreateObject ("WScript.Shell")
'----------------------------------------------------------------
' Don't edit above here
'
' Below is an example of associating PDF files with AcroRd32.exe
' You can change this to whatever you need, and just
' copy and paste the line over again to add more associations.
'-----------------------------------------------------------------
addFileAssociation ".pdf", "AcroRd32.exe"
'-------------------------
' Don't edit below here
'-------------------------
Sub addFileAssociation( fileExt, whichApp )
If ( Left(fileExt, 1) <> "." ) Then
fileExt = "." & fileExt
End If
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & fileExt & "\Application", whichApp
End Sub
Saturday, September 17, 2005
passing username to spamc through maildrop with postfix
xfilter "/usr/local/bin/spamc -u USERNAME"
and have the username changed to the recipient for the mail being processed. After stumbling through some changes in master.cf and trying different maildrop variables, I found that the easiest way to get the username to the script was simply to pass ${recipient} as a parameter to maildrop in master.cf, like this:
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} ${recipient}
(yes, ${recipient} should be there twice.) This way, I can always pull the recipient email address directly into the maildroprc file by referencing $1. So my xfilter line became:
xfilter "/usr/local/bin/spamc -u $1"
then I just fleshed out my maildroprc script (i'd post it here but it's pretty specific to my setup, and other howtos on maildrop/postfix are available) to handle what happens if a mail is tagged as spam.
Tuesday, July 26, 2005
Windows XP automatically tries to search when you click a folder
The following is from http://windowsxp.mvps.org/searchwindow.htm:
If you double-click a drive or folder, Search Companion may start and the drive or folder may not open. 'Search' will be the top most in the right-click context menu for a folder or drive. This usually happens if you've edited the File Folder or Drive via the Folder Options File Types dialog, in order to add a context-menu item such as "Command Prompt here", "Print Directory" feature for folders or drives.
References:
http://support.microsoft.com/?kbid=321379
http://support.microsoft.com/?kbid=321186
Quick fix
Click Start, Run and type this command:
regsvr32 /i shell32.dll
(Tip from David Candy)
To fix the problem manually, open Registry Editor and navigate to:
HKEY_CLASSES_ROOT\Directory\shell
-and-
HKEY_CLASSES_ROOT\Drive\shell
-
In the right-pane, locate and click the (Default) value under the keys mentioned above
-
Click Modify on the Edit menu.
-
Type the word none in the Value data box, and then click OK.
-
Exit Registry Editor.
Windows (WSH) Shell Login scripts won't run after allowing specified programs
Bottom line:
Can't get VBS scripts to run due to having specified an allowed list of windows applications? Try adding wscript.exe to the list.
Users restricted from changing their volume settings for the same reason? Try adding sndvol32.exe.
Thursday, June 02, 2005
Proftpd can't find libmysqlclient.so.14 inside chroot jail
Tuesday, March 01, 2005
mysqldump out of memory error 5
bottom line:
mysqldump giving "out of memory" error, try:
optimze table myTable
Monday, February 28, 2005
Windows MSI installer won't install
Bottom Line:
clicking an MSI file seems to do absolutely nothing? Try granting full access permissions to the windows group "EVERYONE" and see if things change. If security is important on the MSI file, take away the full access as soon as you are finished installing.
Wednesday, February 02, 2005
PHP Sessions stop working after mod_php4 upgrade to php 4.3.10
Monday, December 13, 2004
Found Windows 2000 Sound Drivers for E-Machine Etower 533id2
http://www.opendrivers.com/freedownload/217909/Crystal-CS4281-Sound-Driver-Windows.html
Wednesday, December 08, 2004
Selecting an age from a birthday date field in mySQL
SELECT YEAR(NOW()) - YEAR(birthDate) - IF ( MONTH(NOW()) < MONTH(birthDate), 1, 0 ) - IF ( MONTH(NOW()) = MONTH(birthDate) AND DAYOFMONTH(NOW()) < DAYOFMONTH(birthDate), 1, 0) AS age
Wednesday, December 01, 2004
FreeBSD thinks vpopmail isn't installed even when it is
I just did:
mkdir -p /usr/local/vpopmail/lib
ln -s /home/vpopmail/lib/libvpopmail.a /usr/local/vpopmail/lib/libvpopmail.a
and the problem went away.
Monday, November 29, 2004
Installing vpopmail to a directory other than the default
chsh vpopmail
and changed the home directory to /home/vpopmail. To get it to work seamlessly, though, I also had to set PREFIX=/home before doing the vpopmail install, so the line was:
env PREFIX=/home toaster_setup.pl -s vpopmail
or, if you're using the ports on your own:
env PREFIX=/home make install