CSS/CGI Configuration

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mikey

    CSS/CGI Configuration

    Hi all

    I'm doing my first CSS with a CGI, and I'm haivng some configuration problems.
    I'm on a Mac, Panther.

    I've got a CGI that prints a head with "@import url" to connect to a
    stylesheet. The
    web page comes out fine, but without the stylesheet applied.

    The CGI is in the systemwide cgi-bin
    (/Library/WebServer/CGI-Executables), and I've
    tried the stylesheet in both the systemwide web documents folder, and
    my own local
    web folder. Same effect - zip. I've tried little variations on the
    import (slashes, etc), to
    no effect. I've been advised that the @import is the correct method
    (although I have no
    experience here).

    If I save the source of the page to a file in my local web folder, and
    simply open it up as a
    static page, the CSS is applied as it should be. No trouble there.

    The Apache log gives me complaints about the imported file not
    existing, and one
    weird one about not being able to find a file called cpan.css. What the dilly?

    Mike
    --
    "It's beyond my ken... and my Barbie, and all of my action figures."

  • Lauri Raittila

    #2
    Re: CSS/CGI Configuration

    in comp.infosystem s.www.authoring.stylesheets, Mikey wrote:[color=blue]
    > The web page comes out fine, but without the stylesheet applied[/color]

    URL?

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    Utrecht, NL.
    Support me, buy Opera:

    Comment

    • Darrell Stec

      #3
      Re: CSS/CGI Configuration

      After serious contemplation, on or about Friday 29 April 2005 5:25 pm
      exceptionsTakeT hisOutDude@eart hlink.net wrote:
      [color=blue]
      > Hi all
      >
      > I'm doing my first CSS with a CGI, and I'm haivng some configuration
      > problems. I'm on a Mac, Panther.
      >
      > I've got a CGI that prints a head with "@import url" to connect to a
      > stylesheet. The
      > web page comes out fine, but without the stylesheet applied.
      >
      > The CGI is in the systemwide cgi-bin
      > (/Library/WebServer/CGI-Executables), and I've
      > tried the stylesheet in both the systemwide web documents folder, and
      > my own local
      > web folder. Same effect - zip. I've tried little variations on the
      > import (slashes, etc), to
      > no effect. I've been advised that the @import is the correct method
      > (although I have no
      > experience here).
      >
      > If I save the source of the page to a file in my local web folder, and
      > simply open it up as a
      > static page, the CSS is applied as it should be. No trouble there.
      >
      > The Apache log gives me complaints about the imported file not
      > existing, and one
      > weird one about not being able to find a file called cpan.css. What the
      > dilly?
      >
      > Mike[/color]
      Did you use the escape character "/" in front of the "@" character? Try
      "/@import "myfavorite.css : unless you are using the format"
      print qq~
      <html>
      <body>
      </body>
      </html>~;

      --
      Later,
      Darrell Stec darstec@neo.rr. com

      Webpage Sorcery

      We Put the Magic in Your Webpages

      Comment

      • Mikey

        #4
        Re: CSS/CGI Configuration

        On 2005-04-29 17:23:38 -0400, Lauri Raittila <lauri@raittila .cjb.net> said:
        [color=blue]
        > in comp.infosystem s.www.authoring.stylesheets, Mikey wrote:[color=green]
        >> The web page comes out fine, but without the stylesheet applied[/color]
        >
        > URL?[/color]

        What I have is essentially

        print '<style type="text/css" title="text/css">
        <!--
        @import url("the_styles heet.css");
        -->
        </style>';

        But where should the stylesheet be located?
        --
        "It's beyond my ken... and my Barbie, and all of my action figures."

        Comment

        • Mikey

          #5
          Re: CSS/CGI Configuration

          >>[color=blue][color=green]
          >> I've got a CGI that prints a head with "@import url" to connect to a
          >> stylesheet. The
          >> web page comes out fine, but without the stylesheet applied.
          >>
          >> The CGI is in the systemwide cgi-bin
          >> (/Library/WebServer/CGI-Executables), and I've
          >> tried the stylesheet in both the systemwide web documents folder, and
          >> my own local
          >> web folder. Same effect - zip. I've tried little variations on the
          >> import (slashes, etc), to
          >> no effect. I've been advised that the @import is the correct method
          >> (although I have no
          >> experience here).
          >>
          >> If I save the source of the page to a file in my local web folder, and
          >> simply open it up as a
          >> static page, the CSS is applied as it should be. No trouble there.
          >>
          >> The Apache log gives me complaints about the imported file not
          >> existing, and one
          >> weird one about not being able to find a file called cpan.css. What the
          >> dilly?
          >>
          >> Mike[/color]
          > Did you use the escape character "/" in front of the "@" character? Try
          > "/@import "myfavorite.css : unless you are using the format"
          > print qq~
          > <html>
          > <body>
          > </body>
          > </html>~;
          > --[/color]

          Thanks, but no joy. I put my snippet above.

          It seems like doing a print '<stuff>'; in my cgi is not the
          best method. I was thinking of using CGI.pm .


          --
          "It's beyond my ken... and my Barbie, and all of my action figures."

          Comment

          • Mikey

            #6
            Re: CSS/CGI Configuration

            On 2005-04-30 02:33:52 -0400, Darrell Stec
            <darrell_stec@w ebpagesorcery.c om> said:
            [color=blue]
            > After serious contemplation, on or about Friday 29 April 2005 5:25 pm
            > exceptionsTakeT hisOutDude@eart hlink.net wrote:
            >[color=green]
            >> Hi all
            >>
            >> I'm doing my first CSS with a CGI, and I'm haivng some configuration
            >> problems. I'm on a Mac, Panther.
            >>
            >> I've got a CGI that prints a head with "@import url" to connect to a
            >> s[/color][/color]

            I suddenly realized that I may have two problems here, or a problem of a
            different sort.

            My Apache log gives me this:
            [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
            [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
            [client 127.0.0.1] script not found or unable to stat:
            /Library/WebServer/CGI-Executables/the_stylesheet. css
            [client 127.0.0.1] script not found or unable to stat:
            /Library/WebServer/CGI-Executables/the_stylesheet. css

            Now what could "cpan.css" be? It's not a file referenced by my CGI or
            my stylesheet. Is
            there a CPAN pm that needs to be installed, and some file put up in my
            web page folder?


            --
            "It's beyond my ken... and my Barbie, and all of my action figures."

            Comment

            • Mikey

              #7
              Re: CSS/CGI Configuration

              On 2005-04-30 02:33:52 -0400, Darrell Stec
              <darrell_stec@w ebpagesorcery.c om> said:
              [color=blue]
              > After serious contemplation, on or about Friday 29 April 2005 5:25 pm
              > exceptionsTakeT hisOutDude@eart hlink.net wrote:
              >[color=green]
              >> Hi all
              >>
              >> I'm doing my first CSS with a CGI, and I'm haivng some configuration
              >> problems. I'm on a Mac, Panther.
              >>
              >> I've got a CGI that prints a head with "@import url" to connect to a
              >> s[/color][/color]

              Okay, it looks like there was a css file used for the cpan website; why Apache
              is looking for it is beyond me. My browser did not have a default stylesheet
              selected.

              I set the default stylesheet to my CGI's, and that worked fine. Then I put the
              browser back to no default, and that ended the references to cpan.css in the
              Apache log. Weirdness.

              However... I cannot get the @import url to work, and I figure it must be either
              some fundamental setup problem with Apache.

              I can get the following to work:
              <link rel="stylesheet " type="text/css"
              href="http://localhost/the_stylesheet. css" />

              But naturally I don't want to have hard references in my CGIs.

              Please excuse me as I tend to ramble in my posts. A decade of bad habits.


              Mike



              --
              "It's beyond my ken... and my Barbie, and all of my action figures."

              Comment

              • Michael Winter

                #8
                Re: CSS/CGI Configuration

                On 30/04/2005 14:29, Mikey wrote:

                [snip]
                [color=blue]
                > print '<style type="text/css" title="text/css">[/color]

                I don't think that text/css is a very good name for your style sheet.
                The value of the title element may be presented to the user so they can
                choose between alternate style sheets, so the name should be meaningful.

                If you only have one overall style for the document, you could do away
                with the title attribute altogether.
                [color=blue]
                > <!--[/color]

                It is not necessary, nor really desirable, to "hide" SCRIPT or STYLE
                element content anymore. This particular technique was necessary in the
                past, but not any longer.
                [color=blue]
                > @import url("the_styles heet.css");[/color]

                [snip]
                [color=blue]
                > But where should the stylesheet be located?[/color]

                In the same location you would expect if that were a link: the directory
                of the current document. Probably /cgi-bin/, which I doubt is the most
                appropriate location for a style sheet.

                Mike

                --
                Michael Winter
                Replace ".invalid" with ".uk" to reply by e-mail.

                Comment

                • Jim Moe

                  #9
                  Re: CSS/CGI Configuration

                  Mikey wrote:[color=blue]
                  >
                  > What I have is essentially
                  > print '<style type="text/css">
                  > @import url("the_styles heet.css");
                  > </style>';
                  > But where should the stylesheet be located?[/color]

                  If you use full path from the DocumentRoot to the CSS file, it will
                  work. You are starting from the current directory which is
                  ../cgi-executable/ and your CSS file is not there, obviously.
                  From your other posts I'd say the path should be
                  "/the_stylesheets .css". That is, you have put the stylesheet in the
                  DocumentRoot.

                  --
                  jmm dash list (at) sohnen-moe (dot) com
                  (Remove .AXSPAMGN for email)

                  Comment

                  • Lauri Raittila

                    #10
                    Re: CSS/CGI Configuration

                    in comp.infosystem s.www.authoring.stylesheets, Mikey wrote:
                    [color=blue]
                    > Please excuse me as I tend to ramble in my posts. A decade of bad habits.[/color]

                    As you also didn't give URL, consider yourself not excused and plonked.

                    --
                    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
                    Utrecht, NL.
                    Support me, buy Opera:

                    Comment

                    Working...