Wordpress 2.5 Broken Media Library Fix

This article is part of a backup. It was originally posted on Sunday, April 13. 2008.

The Media Library in WordPress 2.5 is a great new feature. Unfortunately, it doesn’t work for many users right out of the box. This article provides solutions to the two most common problems.

Server Configuration (IIS)

If you are running your blog on IIS, and you are unable to upload files, make sure that your PHP configuration file is set up correctly and that your web server has access to PHP upload directory. The php.ini should contain the following entries:

  1. file_uploads = On
  2. upload_tmp_dir = "C:\Example\Upload\Folder"

Obviously, you can set an upload directory of your choice. Make sure that the IIS_IUSRS user account has full access to this directory.

Server configuration (Apache)

If you are running WordPress on an Apache web server, you might not be able to upload files to the media library with following symptoms:

HTTP Error
An error occurred in the upload. Please try again later.

To fix this issue, add the following lines to the end of your .htaccess file in the root of your WordPress installation:

  1. <IfModule mod_security.c>
  2.     <Files async-upload.php>
  3.         SecFilterEngine Off
  4.         SecFilterScanPOST Off
  5.     </Files>
  6. </IfModule>

JavaScript Fix

The release version of WordPress 2.5 has two typos in the source code that cause the Media Library to break with the following symptoms:

  • Files can be uploaded but not actually added to postings.
  • The Show links in the media library don’t work
  • The browser shows an Object Expected JavaScript error at line 136

To fix this issue, you have to manually edit two files of your WordPress installation in a text editor:

  1. Open the file wp-admin/includes/media.php
  2. At line 817
    debug: false,
            

    remove the comma after false

    debug: false
            

    and save the file.

  3. 3.Open the file wp-includes/js/swfupload/handlers.js
  4. At line 99
    1. .animate({minHeight:0,height:36,}, 400, null …)

    remove the comma after 36

    1. .animate({minHeight:0,height:36}, 400, null, …)

    and save the file.

Other Resources

The server configuration fix has been posted on many forums and blogs. The JavaScript bug fix was first posted on the WordPress Trac bug tracker.

SQL Server 2005 Express on Windows Vista 64-bit

This article is part of a backup. It was originally posted on Sunday, April 13. 2008.

At the very bottom of the SQL Server 2005 Express download page, Microsoft offers 64-bit versions of their installers. Unfortunately, this is not everything you need to run SQL Server Express on 64-bit versions of Windows Vista. As it turns out, the installer currently provided on the download page is bundled with the 32-bit version of the SQL Server Native Client, which causes the subsequent SQL Server installation to fail with the following symptoms:

  • The installer prompts for sqlncli_x64.msi

Restarting the whole installation or uninstalling the Native Client doesn’t help.

Solution

Prior to running the installer for SQL Server 2005 Express 64-bit, you have to manually install the 64-bit version of the Native Client. The following steps proved successful:

  1. Install the 32-bit version of the SQL Native Client if it is not already installed.
  2. Download and install the 64-bit Native Client.
  3. Download and install SQL Server 2005 Express Edition 64-bit
  4. Download and install SQL Server Management Studio Express Edition 64-bit

You should now have a working installation of SQL Server 2005 Express Edition on Windows Vista 64-bit.

References

The problem was first discussed and solved on the MSDN Forums.

MySQL Configuration Wizzard on Windows Vista

This article is part of a backup. It was originally posted on Sunday, April 13. 2008.

The MySQL Server Instance Configuration Wizzard MySQLInstanceConfig.exe (current version 1.0.10.0) that comes with the MySQL Server Community Edition (current version 5.0.51a) has a typo in the embedded manifest file that prevents it from running on Windows Vista machines.

The error can be corrected manually by opening the executable in a resource editor (for example XN Resource Editor) and making the following changes:

  1. Open the resource entry for XP Theme Manifest/1/English (United States)
  2. Change the following line from
    1. <requestedExecutionLevel level="asAdministrator" uiAccess="false"></requestedExecutionLevel>

    to

    1. <requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>

You should now be able to run the tool without problems.

References

A bug report for this issue has been filed in the MySQL bug tracking system.

Remote Desktop Printer Redirection Errors and Warnings in Event Log

This is a simple, but nevertheless annoying problem: you connect to your server with Remote Desktop from another computer, and the Windows event log starts getting spammed with printer related errors and warnings, such as missing printer drivers, printer purge and deletion notifications and other printer related actions.

Automatic printer redirection in Remote Desktop can be a neat feature, but you don’t always need it. Unfortunately, it is turned on be default, so here is how to turn it off…

Disabling Printer Redirection on the Client

Printer redirection can be disabled for a particular client computer in its Remote Desktop Connection dialog by performing the following steps:

  1. Click on the Options >> button to open the options interface
  2. In the Remote Desktop Connection dialog before connecting to the server, select the Local Resources tab.
  3. In the Local devices and resources group uncheck the checkbox for Printers

Back on the General tab you may choose to save these settings in a RDP file for later reuse.

Disabling Printer Redirection on the Server

Sometimes you don’t want any of your client computers to ever share their printers with the server. In that case it is best to disable printer redirection on the server rather than on each individual client. Printer redirection can be disabled server-side through the Group Policy Editor by performing the following steps:

  1. Click on START, select Run…, type mmc and press Enter to launch the Microsoft Management Console.
  2. From the main menu in the Management Console select File and Add/Remove Snap-in…
  3. Click on the Add… button to open the Add Standalone Add-in dialog.
  4. From the list select Group Policy Object Editor and click the Add button.
  5. Click Finish, close and OK to close all open dialogs.
  6. Back in the console, select Console Root → Local Computer Policy → Computer Configuration → Administrative Templates → Windows Components → Terminal Services → Terminal Server → Printer Redirection in the tree.
  7. From the list of settings on the right, double-click on Do not allow printer redirection and set it to Enabled in its Properties dialog.

If you do not see the above item after adding the Local Computer Policy add-in in the console tree, you have to add the System.adm administrative template to the policy by going through the following steps:

  1. In the console, right-click on Console Root → Local Computer Policy → Computer Configuration → Administrative Templates and select Add/Remove Templates… from the context menu.
  2. In the Add/Remove Templates dialog click the Add… button and open the file system.adm.

Note on Windows Home Server

In Windows Home Server the system.adm template is also not loaded by default and has to be added manually as described above. In addition to that, the setting to prohibit printer redirection is located in: Console Root → Local Computer Policy → Computer Configuration → Administrative Templates → Windows Components → Terminal Services → Client/Server data redirection

Gunique GUID Resolution Tool

This article is part of a backup. It was originally posted on Sunday, May 9. 2004.

When developing or reversing engineering software and websites, or when dealing with ActiveX, COM, OLE or other Windows internals in general, one often faces so called GUIDs. Most of the time it is not clear what exactly a given GUID represents. Gunique is a small freeware tool that is able to translate GUIDs to human readable names and vice versa.

Download

Name: Gunique
Version: 1.0.0 Build 9
Download: gunique.zip (286kB)

Note: By using Gunique you agree to the disclaimer at the bottom of this file.

Screenshot

Gunique Screenshot

Contents

Application (2 Files):

  • /gunique.exe – Gunique application
  • /readme.txt – this file

Installation

Just copy the two files into a folder of your choice. No additional steps required.

Known Bugs and Issues

There are no known bugs.

FAQ

Q: What is a GUID?
A: The term GUID is short for Global Unique Identifier, a 128-bit (16 bytes) integer value that can be used to identify any sort of components, such as hardware and software. Whenever you need to uniquely identify something, GUIDs are your best friend.
Q: How are GUIDs used in Microsoft Windows?
A: In the Windows OS, GUIDs are used in a number of different ways. Their main purpose is to identify certain parts of software, specifically COM classes (CLSID) and interfaces (IID), but also type libraries (libUUID), drivers, device classes, network connections and users.
Q: How are GUIDs generated?
A: There are many different ways to create GUIDs, but usually there’s an algorithm to combine various unique settings, such as the MAC address of your network adapter, the IP address of your computer, the current time or a random number. This algorithm guarantees that it’s very unlikely to generate two GUIDs with the same value.
Q: Which GUIDs can be translated into human readable names?
A: Translation is limited to the information saved in the system registry. Therefore only GUIDs for registered software components can be converted. This includes the software components mentioned in the previous question.
Q: What is the Running Object Table (ROT)?
A: The ROT is a Windows internal table that holds a list of currently registered and running COM objects on your machine.
Q: Are wildcards supported in the search window?
A: Yes, currently supported wildcards are ‘*’ to match any number of characters, and ‘?’ to match any single character. Wildcards cannot be used when searching for GUIDs though.
Q: Where can I learn more about COM, GUIDs and the ROT?
A: Do a search on MSDN
Q: Where can I get the latest version of Gunique?
A: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is”, without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Redistribution of Gunique in any form, including but not limited to websites, CDROM and printed media, is strictly prohibited and requires the explicit permission of the author.