CGI script parameter error.

Discussion in 'HTML' started by Mike Duffy, Dec 20, 2010.

  1. Mike Duffy

    Mike Duffy Guest

    I am having a little problem with my ISP's counter script. The script
    works perfectly with:

    Internet Explorer 8, FireFox 3.6.11, Opera 10.63, and Chrome 7.0.

    However, with Safari 5.0.2 and Konqueror 4.4.4 it does not.


    Here is the url of the script itself:

    http://pages.videotron.com/cgi-bin/Count.cgi?
    display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=FFFF00

    This CGI script is served in the form of a GIF image. With the
    various parameters specified in the query section, (i.e. the "dd=.."
    and "md=..." arguments) it should show up as a 7-digit odometer-style
    number with a value of 507 all within a yellow border.

    First, I do not understand why the url alone by itself does not work
    directly as the target for a web browser. This happens for ALL 6
    browsers. If you use the url above, instead of the proper image, you
    will see instead a 6 digit green seven-segment number of value
    "888888" (90x20 px). This indicates that the input parameters (df,
    incr, dd, ft, frgb) are not received okay by the server, but the GIF
    image that is generated *is* received okay by the browser. (You will
    get a similar display if you put improper parameter values in the
    url.)


    But the real problem is that when you make a reference to the url
    within a web page (i.e. as you are supposed to), it does not work
    with Safari & Konqueror. I have created a minimal page which accesses
    the script:

    http://pages.videotron.com/duffym/test.htm


    For your info, here is the source of the page on the line above:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en"><head>
    <Meta Http-Equiv="Content-Type" Content="text/html; charset=UTF-
    8">
    <Meta Http-Equiv="Content-Language" Content="en-US">
    <Meta Http-Equiv="Pragma" Content="no-cache">
    <Meta Http-Equiv="Cache-Control" Content="no-cache">
    <title>Test</title></head>
    <body><p>
    <img src=
    "http://pages.videotron.com/cgi-bin/Count.cgi?
    display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=ffff00">
    </p></body></html>

    With IE, FF, Opera & Chrome, you correctly see "0000507" in a yellow
    rectangle. With Safari & Konqueror, you see the same style as when
    the url is given alone as a web address (green seven-segment on
    black), but the numerical value is apparently a random number instead
    of "888888".

    Does anyone have any clues for me? According to the documentation for
    the script, a random value is displayed whenever the "df" parameter
    is not present or incorrect. In any case, the style that you see is
    what you would expect if none of the parameters were passed.

    --
    http://pages.videotron.com/duffym/index.htm
     
    Mike Duffy, Dec 20, 2010
    #1
    1. Advertising

  2. Mike Duffy

    dorayme Guest

    In article <Xns9E53C4189FD9Brespondinvalidinvali@94.75.214.90>,
    Mike Duffy <> wrote:

    > http://pages.videotron.com/duffym/test.htm
    >
    >
    >
    > With IE, FF, Opera & Chrome, you correctly see "0000507" in a yellow
    > rectangle. With Safari & Konqueror, you see the same style as when
    > the url is given alone as a web address (green seven-segment on
    > black), but the numerical value is apparently a random number instead
    > of "888888".


    In my Safari 3.1.2, I get only the question mark gif for when the
    image is unavailable (there is no alt provided, if it was, I
    might get the alt text)

    --
    dorayme
     
    dorayme, Dec 20, 2010
    #2
    1. Advertising

  3. Mike Duffy

    Peter Guest

    In article <Xns9E53C4189FD9Brespondinvalidinvali@94.75.214.90>,
    lid says...
    > I am having a little problem with my ISP's counter script. The script
    > works perfectly with:
    >
    > Internet Explorer 8, FireFox 3.6.11, Opera 10.63, and Chrome 7.0.
    >
    > However, with Safari 5.0.2 and Konqueror 4.4.4 it does not.
    >
    >
    > Here is the url of the script itself:
    >
    > http://pages.videotron.com/cgi-bin/Count.cgi?
    > display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=FFFF00
    >
    > This CGI script is served in the form of a GIF image. With the
    > various parameters specified in the query section, (i.e. the "dd=.."
    > and "md=..." arguments) it should show up as a 7-digit odometer-style
    > number with a value of 507 all within a yellow border.
    >
    > First, I do not understand why the url alone by itself does not work
    > directly as the target for a web browser. This happens for ALL 6
    > browsers. If you use the url above, instead of the proper image, you
    > will see instead a 6 digit green seven-segment number of value
    > "888888" (90x20 px). This indicates that the input parameters (df,
    > incr, dd, ft, frgb) are not received okay by the server, but the GIF
    > image that is generated *is* received okay by the browser. (You will
    > get a similar display if you put improper parameter values in the
    > url.)
    >
    >
    > But the real problem is that when you make a reference to the url
    > within a web page (i.e. as you are supposed to), it does not work
    > with Safari & Konqueror. I have created a minimal page which accesses
    > the script:
    >
    > http://pages.videotron.com/duffym/test.htm
    >
    >
    > For your info, here is the source of the page on the line above:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > <html lang="en"><head>
    > <Meta Http-Equiv="Content-Type" Content="text/html; charset=UTF-
    > 8">
    > <Meta Http-Equiv="Content-Language" Content="en-US">
    > <Meta Http-Equiv="Pragma" Content="no-cache">
    > <Meta Http-Equiv="Cache-Control" Content="no-cache">
    > <title>Test</title></head>
    > <body><p>
    > <img src=
    > "http://pages.videotron.com/cgi-bin/Count.cgi?
    > display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=ffff00">
    > </p></body></html>
    >
    > With IE, FF, Opera & Chrome, you correctly see "0000507" in a yellow
    > rectangle. With Safari & Konqueror, you see the same style as when
    > the url is given alone as a web address (green seven-segment on
    > black), but the numerical value is apparently a random number instead
    > of "888888".
    >
    > Does anyone have any clues for me? According to the documentation for
    > the script, a random value is displayed whenever the "df" parameter
    > is not present or incorrect. In any case, the style that you see is
    > what you would expect if none of the parameters were passed.
    >
    >


    Without knowing how the script processes those parameters it's hard to
    tell. I did have a situation once where I was passing data from one page
    to another and then reading the data using php. However, my script just
    read the data in what I thought was the order in which it was being
    passed and this caused it not to work in some browsers. What I hadn't
    allowed for was that the data was passed in a different order depending
    on the browser being used.

    Obviously, if your script is 'GETTING' the data by variable name then
    this shouldn't be a problem.

    --
    Pete Ives
    Remove All_stRESS before sending me an email
     
    Peter, Dec 22, 2010
    #3
  4. Mike Duffy

    Mike Duffy Guest

    Mike Duffy <> wrote in
    news:Xns9E53C4189FD9Brespondinvalidinvali@94.75.214.90:

    > I am having a little problem with my ISP's counter script. The
    > script works perfectly with:
    >
    > Internet Explorer 8, FireFox 3.6.11, Opera 10.63, and Chrome 7.0.
    >
    > However, with Safari 5.0.2 and Konqueror 4.4.4 it does not.
    >
    >
    > Here is the url of the script itself:
    >
    > http://pages.videotron.com/cgi-bin/Count.cgi?
    > display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=FFFF00
    >
    > This CGI script is served in the form of a GIF image. With the
    > various parameters specified in the query section, (i.e. the
    > "dd=.." and "md=..." arguments) it should show up as a 7-digit
    > odometer-style number with a value of 507 all within a yellow
    > border.
    >
    > First, I do not understand why the url alone by itself does not
    > work directly as the target for a web browser. This happens for
    > ALL 6 browsers. If you use the url above, instead of the proper
    > image, you will see instead a 6 digit green seven-segment number
    > of value "888888" (90x20 px). This indicates that the input
    > parameters (df, incr, dd, ft, frgb) are not received okay by the
    > server, but the GIF image that is generated *is* received okay by
    > the browser. (You will get a similar display if you put improper
    > parameter values in the url.)
    >
    >
    > But the real problem is that when you make a reference to the url
    > within a web page (i.e. as you are supposed to), it does not work
    > with Safari & Konqueror. I have created a minimal page which
    > accesses the script:
    >
    > http://pages.videotron.com/duffym/test.htm
    >
    >
    > For your info, here is the source of the page on the line above:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "http://www.w3.org/TR/html4/strict.dtd">
    > <html lang="en"><head>
    > <Meta Http-Equiv="Content-Type" Content="text/html;
    > charset=UTF- 8">
    > <Meta Http-Equiv="Content-Language" Content="en-US">
    > <Meta Http-Equiv="Pragma" Content="no-cache">
    > <Meta Http-Equiv="Cache-Control" Content="no-cache">
    > <title>Test</title></head>
    > <body><p>
    > <img src=
    > "http://pages.videotron.com/cgi-bin/Count.cgi?
    > display=counter|df=vldowtzc.dat|incr=0|dd=B|md=7|ft=5|frgb=ffff00">
    > </p></body></html>
    >
    > With IE, FF, Opera & Chrome, you correctly see "0000507" in a
    > yellow rectangle. With Safari & Konqueror, you see the same style
    > as when the url is given alone as a web address (green
    > seven-segment on black), but the numerical value is apparently a
    > random number instead of "888888".
    >
    > Does anyone have any clues for me? According to the documentation
    > for the script, a random value is displayed whenever the "df"
    > parameter is not present or incorrect. In any case, the style that
    > you see is what you would expect if none of the parameters were
    > passed.
    >


    FWIW I played around with the syntax and eventually discovered that the
    CGI script in question accepts "|" or "&" as equivalent, and everything
    works fine on all 6 browsers if you use "&".

    Well, not EVERYTHING. A url consisting solely of the http reference to
    the CGI script does not work, but I do not care about that. Most
    likely, this is due to a MIME mis-attribution. (Because it is in GIF
    format despite the fact that there is no file extension.)

    But it does work okay if the http reference to the CGI is within
    another web page, which is what I want anyways.

    --
    http://pages.videotron.com/duffym/index.htm
     
    Mike Duffy, Dec 28, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    644
    Michael Sparks
    Jul 30, 2005
  2. Amir  Michail

    cgi relay for python cgi script

    Amir Michail, Oct 4, 2005, in forum: Python
    Replies:
    7
    Views:
    419
    Michael Ekstrand
    Oct 4, 2005
  3. sophie_newbie

    Error when python script run as cgi script

    sophie_newbie, Oct 21, 2007, in forum: Python
    Replies:
    3
    Views:
    606
    Dennis Lee Bieber
    Oct 22, 2007
  4. Muzammil
    Replies:
    1
    Views:
    1,141
    red floyd
    Aug 28, 2008
  5. kath
    Replies:
    4
    Views:
    652
    J. Gleixner
    Apr 9, 2007
Loading...

Share This Page