homepage Welcome to WebmasterWorld Guest from 23.22.204.36
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Apache Log mystery ?
mel the snowbird




msg:4545071
 9:31 pm on Feb 12, 2013 (gmt 0)

HI:

Env: I use an C-based executable as my CGI app under my Apache 2.2.22 Server package on my Home Server.
Also, I use the 'Virtual Host' method for getting requests and serving pages to my four sites.

Things have gone great for the past two years. But these past few dayts, I decided to show a 'FAQ' page as a clickable option on my main page. I keep this FAQ.HTM page in a sub-dir under Apache. And I wish to use the window.open() method to show this new FAQ page

I have succeeded in getting the FAQ page to be *sent* to the Client's Browser (i.e., to *me* as a test now).

Problem: I 'see' the FAQ' page being requested, but it fails to display. I reviewed the access.log and found the lines below

The relevant lines (with dates / times remover)
of the access.log are shown below:

Question: Why does Apache assume that the notready.htm file is an *executable* ? Because is a normal .html-styled page ! I must assume that because of the virtual host method show below, that Apache wants to assume it is an executable and fails.

Any advice please ?

Thank you.

-Mel Smith

****** access.log **********
[error] C:/APACHE/cgi-bin/XXX/NOTREADY.HTM is not executable; ensure interpreted scripts have "#!" or "'!" first line
[error] (9)Bad file descriptor: don't know how to spawn child process: C:/APACHE/cgi-bin/XXX/NOTREADY.HTM
[error] C:/APACHE/cgi-bin/XXX/NOTREADY.HTM is not executable; ensure interpreted scripts have "#!" or "'!" first line
[error] (9)Bad file descriptor: don't know how to spawn child process: C:/APACHE/cgi-bin/XXX/NOTREADY.HTM
[error] C:/APACHE/cgi-bin/XXX/NOTREADY.HTM is not executable; ensure interpreted scripts have "#!" or "'!" first line
[error] (9)Bad file descriptor: don't know how to spawn child process: C:/APACHE/cgi-bin/XXX/NOTREADY.HTM



**** and here is virtual host set up for the site ****

<VirtualHost *:4297>
ServerName ww2.whosaway.net:4297
ServerAlias whosaway.net:4297
DocumentRoot "C:/Apache/cgi-bin/xxx"
<Directory "C:/Apache/cgi-bin/xxx">
Options ExecCGI Indexes FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
# Next is Me for testing only
Allow from 12.34.56.78
</Directory>
<IfModule alias_module>
ScriptAlias /cgi-bin/xxx/ "C:/Apache/cgi-bin/xxx/"
AddHandler cgi-script .exe
</IfModule>

DirectoryIndex xxxinit.exe index.htm notready.htm faq.htm
</Virtualhost>

***********************************

 

g1smd




msg:4545075
 9:39 pm on Feb 12, 2013 (gmt 0)

As far as I am aware, anything placed in /cgi-bin/ needs to be an executable file.

mel the snowbird




msg:4545098
 10:47 pm on Feb 12, 2013 (gmt 0)

Will try moving it.

Thanks !

mel the snowbird




msg:4545117
 12:55 am on Feb 13, 2013 (gmt 0)

Hi:

Somehow :)) it is now working.

I moved the .htm file to a the sub-dir:

...\cgi-bin\XXX\FILES\FAQ.HTM

and it is now accessible directly from the browser without intervention by my CGI app.

Here is the Javascript open window now:

var faqwin = window.open('http://ww2.whosaway.net:4297/files/faq.htm','faq',
'menubar=yes,scrollbars=yes,resizable=yes,left=20,top=220,height=300,width=250') ;
//faqwin.title = 'The FAQ Sheet' ;

Thanks for helping.

(Now I've got to learn to use it properly ! )

-Mel Smith

lucy24




msg:4545154
 3:01 am on Feb 13, 2013 (gmt 0)

Doesn't this fall under the head of "... but only what I tell it"? ;)

Any file that has the handler cgi-script will be treated as a CGI script <snip> Files acquire this handler either by having a name containing an extension defined by the AddHandler directive, or by being in a ScriptAlias directory.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved