Category: Technology

Drupal YUI Rich Text Editor: Set maximum image dimensions on uploaded images

The search for the perfect WYSIWYG text editor in Drupal goes on. The best I’ve seen yet is YUI Rich Text Editor, but it still has some serious browser incompatibilities and usability problems. One significant is that there is nothing stopping users from upload a huge image, and not resizing it down using the provided resizing tools.

Now that just most cameras produce images of enormous resolution, users in my Drupal sites’ users often upload gigantic photos, which remain splashed across the entire layout until I get around to fixing them. I finally got tired of correcting users’ posts for them and fixed the CSS so it will never happen again.

Continue reading

Troubleshooting iPhone “No-Service” messages, part 3

I’ve written in the past about some of the solutions people have come up with to deal with the dreaded “No-Service” message on an iPhone. But yesterday I realized I’d forgotten one of the easiest to try: make sure your hand is not covering the antenna. Covering the antenna accidentally may not cause you to see “No Service” but the effect will be the same – no bars at all.

Continue reading

The Processing Instruction Target Matching “[xX][mM][lL]” is Not Allowed

When running Java or other types of applications which use an XML file as part of the input, you may see this error: The Processing Instruction Target Matching “[xX][mM][lL]” is Not Allowed.

Often the cause is a malformed XML file, with a common problem being a blank line accidentally inserted before the required first line of the xml:

[ A blank line here will cause the error ]
<?xml version-"1.0"?>
Continue reading

FTP a file from one server to another, automatically

We are using an ASP script to create iCal files from a database, so another department can display the events on their web-based calendar.

Their calendar page is outside the corporate firewall. The ASP script needs to reside on and IIS server within the firewall. I needed a fool-proof way to transfer the ical file nightly out to an external web server so it could be accessed by any calendar applications that need to use it. The best way I’ve found so far is to create a batch file with command-line FTP instructions, and add it to a Windows scheduled task.

  1. To do this with your own files, create a directory that will hold the batch file somewhere on the server. Since the batch file will contain your destination server’s ftp password in plaintext, you will want to secure the directory. Create a Windows or domain account whose password will never change. I happened to have a “utility” domain-based account that already had access to some parts of the server, so I gave that account rights to the new directory.

Continue reading

SQL Server or SQL Server Express: Connection Error: (provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe.

After a server containing a SQL Server database is restarted, you may get the error

Connection Error: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.

Or you may get an error like the one below:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection.s (provider: Shared Memory Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)”

Continue reading

Fixing the error: JAVA_HOME is not set on a Mac

While setting up Nutch on a Mac, I kept getting this error in the terminal:

Error: JAVA_HOME is not set

To fix the error on OS X 10.6.x (Snow Leopard), enter the following at the command prompt:

export JAVA_HOME=$(/usr/libexec/java_home)

On 10.5 and above, the command line tool /usr/libexec/java_home dynamically finds the top Java version specified in Java Preferences for the current user. Using this method will allow the path to automatically change as software updates change Java versions.

Continue reading