[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030109: how to display loop of images in a webpage (cont.)



>From: Sridharareddy Duggireddy <address@hidden>
>Organization: USF
>Keywords: 200301061638.h06Gcdt04784 McIDAS web animated GIF

Sridhara,

>   I have tried but the message is still coming. The message is coming
>below the loop of images. can you please check the link
>   http://metlab.cas.usf.edu/sridhara/surfacemaps.html and click on the
>button loop of images ?

I see two messages that should not be there:

'/root/bin/GE-IRloop.gif: Permission denied.' is displayed at the top of the
GIF (below the 'Surface Maps' label, but not centered), and 'Missing name for
redirect.' is displayed at the bottom of the GIF and is centered.

The fact that one line is not centered while the other is should be
a clue as to where the messages are coming from.

>   I am sending the cgi script and shell script along with this. Please
>see them.

It would be helpful if I could see/play with the scripts directly.
Can you ask Shelly to allow me to ssh to the machine?  I tried getting
on metlab.cas.usf.edu as alaing, but I got no response from metlab.
I have to think that this is because access to the machine through a
firewall (or something else) has been restricted.

When I took a look at gen_mcidas_loop.cgi, I see a couple of problems
that may or may not be the cause of the extraneous messages:

o your PATH declaration ends in a semi-colon.  I don't think that the
  semi-colon should be there

o you are redirecting stderr to the same unit as stdout, but you don't
  specify where either output should go (like /dev/null).  This will
  mean that error messages will go the same place as echos.  This
  is most likely your problem.

  What happens if you send stderr to /dev/null:

  exec 2>> /dev/null

  and not send stdout to the same place (i.e., remove 'exec 2>&1')?

Also, gen_micdas_loop.csh has what looks to be an extraneous character
after the exit at the end of the script: 'exit >'

>#!/bin/sh 
>set -f
>
>cd /usr/local/apps/php-apache/cgi-bin
>CAT=/bin/cat
>
>echo "Content-type:text/html"
>echo "Pragma:no-cache"
>echo ""
>
>PATH=/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/local/apps/php-apache/cgi-bin:.;
>export PATH
>
>exec 2>&1
>
>if [  -x $CAT  ]; then
>
>$CAT << BOT
>
><title> USF McIDAS Surface Maps</title>
><body><br>
><a href="http://metlab.cas.usf.edu/sridhara/surfacemaps.html";>Back</a>
><center><h2>Surface Maps</h2></center>
>
> 
>BOT
>
>  echo \<pre\>
>  /usr/local/apps/php-apache/cgi-bin/gen_mcidas_loop.csh    
>
>else 
>  echo cannot find cat on this system.
>  exit
>
>fi
>
>$CAT << EOT
>
></pre>
></BODY>
>
>EOT

>#!/bin/csh -f
>
>setenv MYDIR /usr/local/apps/php-apache/htdocs/sridhara/mcidas/gifs
>
>cd $MYDIR 
>
>convert \
>        -loop 9999 \
>        -delay 50 \
>         frame1.gif \
>         frame2.gif \
>         frame3.gif \
>         frame4.gif \
>         frame5.gif \
>         frame6.gif \
>         frame7.gif \
>         frame8.gif \
>         frame9.gif \
>         -delay 200 \
>         frame10.gif \ 
>         GE-IRloop.gif 
>echo "<center>"
>echo "<img 
>src="http://metlab.cas.usf.edu/sridhara/mcidas/gifs/GE-IRloop.gif";>" 
>echo </center>
>
>exit > 

Tom

>From address@hidden Fri Jan 10 09:51:58 2003
>Subject: Re: 20030109: how to display loop of images in a webpage (cont.) 

Hi Tom,

I removed exec 2>&1 and i added the line exec 2>> /dev/null. It is
working now. I removed the extra character at the end of script (exec >)in
gen_mcidas_loop.csh . Thanks for your help.

regards,
Sridhara.