|
-
Aug 19th, 2001, 11:47 AM
#1
Thread Starter
New Member
Strange csh script error with apache cgi
Hi, this question is for any cgi/csh gurus here.
Couple of weeks ago I setup my first Apache server ( 1.3.9 ) on
Solaris 2.6 platform. It was a really a breeze to get my first html
web page going.
Now I am trying to make some of my previously written csh scripts
available for execution on the web page. Have configured the apache
for CGI. The simple sh/ksh scripts seem to work fine. But my trial csh
( c shell ) scripts gave "mis-configuration" error messages. The
error log said "bad header" to few echo command strings in the csh
script. By hit and trial, I was able to fix this error by adding an
extra line of ,echo "" ,before every echo command string.
Does anyone know if all functional csh scripts should execute with
apache cgi by placing them under cgi-bin directory without any
modifications to the csh scripts?
Also, if I execute a csh script successfully and output is displayed
on web page, is there a way to place a URL on the script output page
to take user back to home html page ?
Your help is greatly appreciated.
-
Aug 19th, 2001, 12:08 PM
#2
well, first you can only run cgi scripts in the folder that is specified in the apache httpd.conf file. unless you setup virtual hosts then it would be what ever folder you specified for.
you should be able to run any script in that folder.
then for the link to return to the main page just put this after you display the output page.
Code:
print '<center><a href="home.html">Back Home Page</a></center>'."\n" ;
-
Aug 22nd, 2001, 11:50 AM
#3
Thread Starter
New Member
Thank you very much scoutt !
Using this command, I am able to put anchors on the same page now that executes my csh script. I had to change "print" to "echo" as c shell does not like print command.
But it's working now !!! And I'm busy making my csh/html combo script monitor network dynamically and do other interesting things.
-
Aug 22nd, 2001, 02:50 PM
#4
yeah the print and echo do pretty much the samething.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|