Forum Moderators: phranque

Message Too Old, No Replies

Apache error:"Bad file descriptor: don't know how to spawn"

         

spritesdaddyo

11:55 pm on Mar 20, 2006 (gmt 0)

10+ Year Member



Hey all,
I'm kinda stuck on what should be a very simple non-issue: I'm running Apache 2.0.55 on XP with latest perl interpreter, and while the application runs and creates the web pages, all the images & javascript contained in sub-directories are erroring and not being handled appropriatly by Apache.

I feel this is simply a configuration issue, but I'm running out of time and options!

I've tried different versions of 'Alais' or 'ScriptAlias' of the directory where this app lives, e.g. ScriptAlias /build_manager "C:/build_manager", with the same results.

The errors for all the failing files in error.log is "(9)Bad file descriptor: don't know how to spawn child process: C:/Build_Manager/images/help_0.jpg, referer: [explorersbuild...]

I feel that I'm missing a critical <Directory> directive here...

Thanks Kindly,

jdMorgan

3:36 am on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Images and JavaScripts aren't 'handled' by Apache at all -- They're handled client-side (by the browser).

Make sure all links on generated pages are server-relative or canonical, that is, <img src="/logo.gif"> or <img src="http://www.example.com/logo.gif>", and not <img src="logo.gif"> or <img src="../logo.gif">. Otherwise, the image links will break because the browser will resolve them according to the 'directory' URL where it thinks it requested the page from.

Jim

spritesdaddyo

4:56 am on Mar 21, 2006 (gmt 0)

10+ Year Member



Hmmm,
interestingly I thought there were in cannonical form...

Truth is, this application worked on a previous version of Apache (1.3#*$!)... and the only thing that's changed is the version of Apache!

Yes, i know what you may say: Why don't I consult my old httpd.conf file? Well, the machine went belly up and I can't find a current copy of that file (yet).
But I did have the application backed 'as-is' from the machine.

So, I will look into the relative paths, but here's another question:
Was there a huge difference in the way 1.3xx and 2.0.55 use paths, etc?
Shouldnt' I almost expect the same behaviour?

Thanks again

jdMorgan

8:26 pm on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks like an intepreter path problem. Does any of this [google.com] help?

Jim

spritesdaddyo

10:04 pm on Apr 12, 2006 (gmt 0)

10+ Year Member



OK, so I ended 'fixing' this in the following manner (but I have my doubts even though it works fine):

In the [ScriptAlias] section, I added the following defualt handlers to my <Directory> section, to allow the files to be handled as what they are and not as a scriptfile:

<Directory "C:/cgi-bin/">
AddHandler default-handler .jpg .gif .js .txt .bat
<Directory "C:/cgi-bin/">

Even though everything works fine, I'm still asking myself Why does this work when an [Alias] directive should work just as well?

In any case, thanks for your reponses...they were indeed helpful.