Skip to: Site menu | Main content

Email Facebook LinkedIn Twitter Google

Blog...

500 Error when running PHP on IIS

Attempting to get PHP 5.6 running on Windows Server 2012 (IIS 8) I started receiving generic 500 errors.

I enabled Failed Request tracing and reviewed the trace.

The trace revealed this error:

ModuleName FastCgiModule
ErrorCode The extended attributes are inconsistent. (0xff)

The problem was a missing Visual C++ runtime.

Ensure the appropriate VC++ runtime is installed for the version of PHP running.

In this case I needed the VC++ 11 runtime.

ColdFusion Will Not Start After Changing Service Account

While creating a new ColdFusion server I attempted to change the Windows Service account to a domain service account. I've done this on almost every ColdFusion server I've ever setup because they typically need access to network resources and it makes it easy to manage the application rights.

This time however I was unable to do so. I received a generic error from the service manager:

The Coldfusion Service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs

The ColdFusion server logs were not very helpful. They showed the server starting and stopping (just as the service manager error stated).

[More]

IIS 7.5 500 Error When Serving Static Files

Ran across an interesting problem. While setting up a new Windows 2008 R2 erver and website on IIS; I noticed that the site was generating 500 errors when serving static files (images, css, html, etc.)

I turned on Failed Request Tracing and noticed that I was getting this logged

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Based simply on previous experience I went to the IIS Feature Delegation and reviewed the delegation for the various IIS modules.

I found that by setting Handler Mappings to Read/Write the error was resolved.

I'm still not sure why this causes a problem since I'm not defining any custom handlers at the site level.

Perhaps this setting must be read/write even when custom handlers are set at the server level?

Coldfusion RDS 404 error on OSX

When running Coldfusion on OSX with RDS enabled you may receive a 404 error when trying to connect your IDE (CF Builder, Homesite, etc.)

After reviewing permissions and configuration I found that the issue was Apache checking for the existence of the page prior to attempting to run it. The RDS IDE functions/page does not exist because it simply a URL pattern defined in the web.xml file.

An easy fix was to setup a dummy folder/file:

/wwwroot/CFIDE/main/ide.cfm

The IDE.CFM page can be blank, Apache just needs to verify the file exists prior to handing it to the Java server for processing.

BIRT Exception "ReferenceError: <OBJECT> is not defined"

While trying to use a Scripted Data Source within BIRT Report Designer I ran across this error:

BIRT ReferenceError: <OBJECT> is not defined

Where OBJECT is any Java class. My Java class was very simple.

I verified my JAR file was in the plugin scriptlib folder

C:\eclipse_birt\plugins\org.eclipse.birt.report.viewer_4.3.1.v201309171028\birt\scriptlib

My problem was that my Java class had a main[] signature for some simple testing outside of BIRT.

I removed the main[] method on the class and exported my JAR again.

BIRT Report Designer could then instantiate my Java class without error.

Use PowerShell to add IIS virtual directory with Login (Connect As)

While trying to automate the creation of new IIS websites using PowerShell I needed a script to create IIS virtual directories with a specific login (i.e. Connect As)

After several hours of searching and trying various solutions I finally arrived at this:

$sitename = "My Website Name"
$virtualdirectory = "virtual1"
$virtualdirectorypath = "C:\My Virtual Path"
$username = "username1"
$password = "password1"

New-WebVirtualDirectory -Site $sitename -Name $virtualdirectory -PhysicalPath $virtualdirectorypath

Set-WebConfigurationProperty "system.applicationHost/sites/site[@name='$sitename']/application[@path='/']/virtualDirectory[@path='$virtualdirectory']" -name userName -value $username

Set-WebConfigurationProperty "system.applicationHost/sites/site[@name='$sitename']/application[@path='/']/virtualDirectory[@path='$virtualdirectory']" -name password -value $password

I tried several path alternatives, however the XPath queries listed in the snippet are the only iteration that worked.

Hope this saves someone else a little time.

IIS 7/8 and Coldfusion 10

While deploying my first Coldfusion 10 server on Windows 2008 R2 SP1, I ran into this strange behavior.

My IIS Default website had no issues processing CFM files after the install. However other IIS sites would not process any CFM pages. The message I received from IIS was the standard 404.

Accessing the URL on the server I found that the requested URL was: http://{my site}/jakarta/isapi_redirect.dll

Just to see if it would work I mapped a virtual directory named "jakarta" to


CFUSION INSTALL\config\wsconfig\{instance id}

Magically my site began processing CFM files.

Sami Hoda's entry pointed me in the right direction of running the WSConfig utility on each instance.

The WSconfig more completely configures the site, but still seems like a pain to have to do this on every new site.

My Windows 8 Impressions

I upgraded from Windows 7 Enterprise to Windows 8 Enterprise. My upgrade was very smooth. Probably the easiest Windows upgrade I've done. The new OS seems as solid as Windows 7. I thought the new Modern UI (aka Metro) would present a problem in my day to day use of the OS and applications. Surprisingly this is not true. While I'm not terribly impressed with the UI it's fairly easy to ignore. It essentially replaces the Start Menu with a full screen UI. The Desktop view is still available and works as it has in previous versions of Windows.

In fact, the only real complaint I have about Windows 8 is that it's going to be a tough sell to the casual user. The replacement of the Start Menu could be just enough to scare them and it doesn't appear to enhance anything about the Windows experience. In my short time with Windows 8 I've already spent 99% of my time outside of the Modern UI and it's Apps.

Windows 8 is a good OS, but probably not worth the upgrade for the casual computer user.

HTTP GET/POST using VB.NET and BackgroundWorker Class

A simple code example using VB.NET LAMDA's to create an inline BackgroundWorker object. I'm not a VB guru so there may be better ways to do this.

[More]

Eclipse Remote Systems FTP issues

I recently installed Nodeclipse for developing Node.js. Nice little editor with some code hinting and quick Node run command.

Due to my development requirements (and laziness) I wanted to work with the remote JS files using FTP. Nodeclipse does not support FTP out of the box. Enter "Remote System Explorer" for Eclipse.

The plugin installed easily. I entered my connection details. The console started showing my connection status and directory listings. However, attempting to explore the FTP site resulted in a generic "file system input or output error" and/or "java.net.SocketException".

After some searching I found that the issue actually lies with the underlying Java VM used by Eclipse (Nodeclipse). I'd upgraded to JRE7 and there seems to be a bug in this release that causes an incompatibility with Eclipse.

I changed my shortcut to force Nodeclipse to use an install of JRE6 BIN folder.

eclipse.exe -vm "C:\Program Files\Java\jre6\bin"

NOTE: Ensure you are using the appropriate architecture (32-bit OR 64-bit) when matching JRE6 to Eclipse

More Entries