the following code does work under my Windows development environment, but not on my production Linux/Apache2/FastCGI env.