Announcement

Collapse
No announcement yet.

Missing miva pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Missing miva pages



    How do I tell miva (Empresa 3.96) to run a designated script when it can't
    find the specified page (instead of the basic error message?). Ideally the
    error-handling page would have access to the requested URL

    --
    Richard Grevers
    Between two evils always pick the one you haven't tried




    #2
    Missing miva pages



    Well, its not miva that is giving you a page/script not found error...its the web server.
    Typicially this is defined by the web server's main config script. You could define it as
    not_found.mv and run Miva script inside that file...


    -Bruce
    ......................................
    PHOSPHOR Media
    Featuring: StoreMan - A smarter way to manage Miva Merchant(tm) Store Content.
    Download a hassle-free demo today
    <A HREF ="http://www.phosphormedia.com/go.mv?ID=listsm">http://www.phosphormedia.com/go.mv?ID=listsm</A>
    ......................................




    > -----Original Message-----
    > From: [email protected] [mailto:[email protected]]On
    > Behalf Of Richard Grevers
    > Sent: Wednesday, January 12, 2005 1:50 AM
    > To: [email protected]
    > Subject: [meu] Missing miva pages
    >
    >
    > How do I tell miva (Empresa 3.96) to run a designated script when it can't
    > find the specified page (instead of the basic error message?). Ideally the
    > error-handling page would have access to the requested URL
    >
    > --
    > Richard Grevers
    > Between two evils always pick the one you haven't tried
    >
    >
    >

    Comment


      #3
      Missing miva pages



      On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor Media
      <[email protected]> gave utterance to the following:

      > Well, its not miva that is giving you a page/script not found
      > error...its the web server.
      > Typicially this is defined by the web server's main config script. You
      > could define it as
      > not_found.mv and run Miva script inside that file...
      >

      No Bruce - I already know how to run a mivascript for a standard 404 error
      from the webserver.
      But this is not the case I am talking about. If you request an url for
      foo.mv and foo.mv does not exist, Miva generates a one line syntax error:
      Unable to open path/foo.mv
      Of course it also does the same thing if you make an MvDO call to a
      nonexistant script in the middle of a script.
      It is indeed curious that the server doesn't check the existence of the
      URL before handing it to Empresa (or Miva Mia where the same thing
      happens) but it has happened to me on every server where I've used Miva
      for the past 6 years.
      It prevents a graceful death.
      Since my initial post, I've been right through the Empresa config
      documentation, but I can't see anything which would help.



      >
      >> -----Original Message-----
      >> From: [email protected] [mailto:[email protected]]On
      >> Behalf Of Richard Grevers
      >> Sent: Wednesday, January 12, 2005 1:50 AM
      >> To: [email protected]
      >> Subject: [meu] Missing miva pages
      >>
      >>
      >> How do I tell miva (Empresa 3.96) to run a designated script when it
      >> can't
      >> find the specified page (instead of the basic error message?). Ideally
      >> the
      >> error-handling page would have access to the requested URL
      >>
      >> --
      >> Richard Grevers
      >> Between two evils always pick the one you haven't tried
      >>
      >>
      >>

      Comment


        #4
        Missing miva pages



        Right, sorry...PBC (Posting Before Coffee) again...


        -Bruce
        ......................................
        PHOSPHOR Media
        Featuring: StoreMan - A smarter way to manage Miva Merchant(tm) Store Content.
        Download a hassle-free demo today
        <A HREF ="http://www.phosphormedia.com/go.mv?ID=listsm">http://www.phosphormedia.com/go.mv?ID=listsm</A>
        ......................................




        > -----Original Message-----
        > From: [email protected] [mailto:[email protected]]On
        > Behalf Of Richard Grevers
        > Sent: Wednesday, January 12, 2005 10:00 AM
        > To: Bruce - Phosphor Media; [email protected]
        > Subject: Re: [meu] Missing miva pages
        >
        >
        > On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor Media
        > <[email protected]> gave utterance to the following:
        >
        > > Well, its not miva that is giving you a page/script not found
        > > error...its the web server.
        > > Typicially this is defined by the web server's main config script. You
        > > could define it as
        > > not_found.mv and run Miva script inside that file...
        > >
        >
        > No Bruce - I already know how to run a mivascript for a standard 404 error
        > from the webserver.
        > But this is not the case I am talking about. If you request an url for
        > foo.mv and foo.mv does not exist, Miva generates a one line syntax error:
        > Unable to open path/foo.mv
        > Of course it also does the same thing if you make an MvDO call to a
        > nonexistant script in the middle of a script.
        > It is indeed curious that the server doesn't check the existence of the
        > URL before handing it to Empresa (or Miva Mia where the same thing
        > happens) but it has happened to me on every server where I've used Miva
        > for the past 6 years.
        > It prevents a graceful death.
        > Since my initial post, I've been right through the Empresa config
        > documentation, but I can't see anything which would help.
        >
        >
        >
        > >
        > >> -----Original Message-----
        > >> From: [email protected] [mailto:[email protected]]On
        > >> Behalf Of Richard Grevers
        > >> Sent: Wednesday, January 12, 2005 1:50 AM
        > >> To: [email protected]
        > >> Subject: [meu] Missing miva pages
        > >>
        > >>
        > >> How do I tell miva (Empresa 3.96) to run a designated script when it
        > >> can't
        > >> find the specified page (instead of the basic error message?). Ideally
        > >> the
        > >> error-handling page would have access to the requested URL
        > >>
        > >> --
        > >> Richard Grevers
        > >> Between two evils always pick the one you haven't tried
        > >>
        > >>
        > >>

        Comment


          #5
          Missing miva pages



          Just put in some basic error checking routine to the calling script. It
          the missing URL is called by a browser, they will get a 404 error. If it
          is MvCALLed you need to trap it with an error check routine. Like (typed
          freehand, might need fix):

          <MvCALL this sucker>
          <MvIF EXPR="{ MvCALL_Error }">
          <MvASSIGN NAME="g.Error_Message" VALUE="{ MvCALL_Error }">
          <MvEVAL EXPR="{ g.Error_Message }">


          <MvEXIT>
          </MvIF>

          Jonathan
          Driftwood Network Services




          At 12:59 PM 1/12/2005, you wrote:
          >On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor Media
          ><[email protected]> gave utterance to the following:
          >
          >>Well, its not miva that is giving you a page/script not found
          >>error...its the web server.
          >>Typicially this is defined by the web server's main config script. You
          >>could define it as
          >>not_found.mv and run Miva script inside that file...
          >
          >No Bruce - I already know how to run a mivascript for a standard 404 error
          >from the webserver.
          >But this is not the case I am talking about. If you request an url for
          >foo.mv and foo.mv does not exist, Miva generates a one line syntax error:
          >Unable to open path/foo.mv
          >Of course it also does the same thing if you make an MvDO call to a
          >nonexistant script in the middle of a script.
          >It is indeed curious that the server doesn't check the existence of the
          >URL before handing it to Empresa (or Miva Mia where the same thing
          >happens) but it has happened to me on every server where I've used Miva
          >for the past 6 years.
          >It prevents a graceful death.
          >Since my initial post, I've been right through the Empresa config
          >documentation, but I can't see anything which would help.
          >
          >
          >
          >>
          >>>-----Original Message-----
          >>>From: [email protected] [mailto:[email protected]]On
          >>>Behalf Of Richard Grevers
          >>>Sent: Wednesday, January 12, 2005 1:50 AM
          >>>To: [email protected]
          >>>Subject: [meu] Missing miva pages
          >>>
          >>>
          >>>How do I tell miva (Empresa 3.96) to run a designated script when it
          >>>can't
          >>>find the specified page (instead of the basic error message?). Ideally
          >>>the
          >>>error-handling page would have access to the requested URL
          >>>
          >>>--
          >>>Richard Grevers
          >>>Between two evils always pick the one you haven't tried
          >>>
          >>>
          >>>

          Comment


            #6
            Missing miva pages



            On Wed, 12 Jan 2005 13:20:07 -0500, Jonathan - Driftwood
            <[email protected]> gave utterance to the following:

            > Just put in some basic error checking routine to the calling script. It
            > the missing URL is called by a browser, they will get a 404 error. If
            > it is MvCALLed you need to trap it with an error check routine. Like
            > (typed freehand, might need fix):
            >
            > <MvCALL this sucker>
            > <MvIF EXPR="{ MvCALL_Error }">
            > <MvASSIGN NAME="g.Error_Message" VALUE="{ MvCALL_Error
            > }">
            > <MvEVAL EXPR="{ g.Error_Message }">


            > <MvEXIT>
            > </MvIF>
            >

            But I'm not talking about MvCALL, I'm talking about any link typed into
            the browser or a link on any web page (not necessarily on your site). Can
            you confirm that if you follow
            <A HREF ="http://www.firework.co.nz/fireworks/stage_pyro_cannon.mv you don't get a ">http://www.firework.co.nz/fireworks/...pyro_cannon.mv you don't get a </A>
            404 page, only the error message from miva?

            Checking the existence of every link before writing the link would be a
            huge performance hit on a site. (That's why Wikipedia is so slow!)

            >
            >
            > At 12:59 PM 1/12/2005, you wrote:
            >> On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor Media
            >> <[email protected]> gave utterance to the following:
            >>
            >>> Well, its not miva that is giving you a page/script not found
            >>> error...its the web server.
            >>> Typicially this is defined by the web server's main config script. You
            >>> could define it as
            >>> not_found.mv and run Miva script inside that file...
            >>
            >> No Bruce - I already know how to run a mivascript for a standard 404
            >> error
            >> from the webserver.
            >> But this is not the case I am talking about. If you request an url for
            >> foo.mv and foo.mv does not exist, Miva generates a one line syntax
            >> error:
            >> Unable to open path/foo.mv
            >> Of course it also does the same thing if you make an MvDO call to a
            >> nonexistant script in the middle of a script.
            >> It is indeed curious that the server doesn't check the existence of the
            >> URL before handing it to Empresa (or Miva Mia where the same thing
            >> happens) but it has happened to me on every server where I've used Miva
            >> for the past 6 years.
            >> It prevents a graceful death.
            >> Since my initial post, I've been right through the Empresa config
            >> documentation, but I can't see anything which would help.
            >>
            >>
            >>
            >>>
            >>>> -----Original Message-----
            >>>> From: [email protected] [mailto:[email protected]]On
            >>>> Behalf Of Richard Grevers
            >>>> Sent: Wednesday, January 12, 2005 1:50 AM
            >>>> To: [email protected]
            >>>> Subject: [meu] Missing miva pages
            >>>>
            >>>>
            >>>> How do I tell miva (Empresa 3.96) to run a designated script when it
            >>>> can't
            >>>> find the specified page (instead of the basic error message?). Ideally
            >>>> the
            >>>> error-handling page would have access to the requested URL
            >>>>
            >>>> --
            >>>> Richard Grevers
            >>>> Between two evils always pick the one you haven't tried
            >>>>
            >>>>
            >>>>

            Comment


              #7
              Missing miva pages



              The sample you offer is not giving a 404 error. But it is because of
              server config, nothing to do with Miva Script.

              Look closely at your Apache error page definitions for the site, or what
              might be there munging the results.

              The link you offered generates a 200 result instead of the 404 it should.

              Jonathan
              Driftwood Network Services


              At 01:35 PM 1/12/2005, Richard Grevers wrote:
              >On Wed, 12 Jan 2005 13:20:07 -0500, Jonathan - Driftwood
              ><[email protected]> gave utterance to the following:
              >
              >>Just put in some basic error checking routine to the calling script. It
              >>the missing URL is called by a browser, they will get a 404 error. If
              >>it is MvCALLed you need to trap it with an error check routine. Like
              >>(typed freehand, might need fix):
              >>
              >><MvCALL this sucker>
              >> <MvIF EXPR="{ MvCALL_Error }">
              >> <MvASSIGN NAME="g.Error_Message" VALUE="{ MvCALL_Error
              >>}">
              >> <MvEVAL EXPR="{ g.Error_Message }">


              >> <MvEXIT>
              >> </MvIF>
              >
              >But I'm not talking about MvCALL, I'm talking about any link typed into
              >the browser or a link on any web page (not necessarily on your site). Can
              >you confirm that if you follow
              ><A HREF ="http://www.firework.co.nz/fireworks/stage_pyro_cannon.mv you don't get a">http://www.firework.co.nz/fireworks/...pyro_cannon.mv you don't get a</A>
              >404 page, only the error message from miva?
              >
              >Checking the existence of every link before writing the link would be a
              >huge performance hit on a site. (That's why Wikipedia is so slow!)
              >
              >>
              >>
              >>At 12:59 PM 1/12/2005, you wrote:
              >>>On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor Media
              >>><[email protected]> gave utterance to the following:
              >>>
              >>>>Well, its not miva that is giving you a page/script not found
              >>>>error...its the web server.
              >>>>Typicially this is defined by the web server's main config script. You
              >>>>could define it as
              >>>>not_found.mv and run Miva script inside that file...
              >>>
              >>>No Bruce - I already know how to run a mivascript for a standard 404
              >>>error
              >>>from the webserver.
              >>>But this is not the case I am talking about. If you request an url for
              >>>foo.mv and foo.mv does not exist, Miva generates a one line syntax
              >>>error:
              >>>Unable to open path/foo.mv
              >>>Of course it also does the same thing if you make an MvDO call to a
              >>>nonexistant script in the middle of a script.
              >>>It is indeed curious that the server doesn't check the existence of the
              >>>URL before handing it to Empresa (or Miva Mia where the same thing
              >>>happens) but it has happened to me on every server where I've used Miva
              >>>for the past 6 years.
              >>>It prevents a graceful death.
              >>>Since my initial post, I've been right through the Empresa config
              >>>documentation, but I can't see anything which would help.
              >>>
              >>>
              >>>
              >>>>
              >>>>>-----Original Message-----
              >>>>>From: [email protected] [mailto:[email protected]]On
              >>>>>Behalf Of Richard Grevers
              >>>>>Sent: Wednesday, January 12, 2005 1:50 AM
              >>>>>To: [email protected]
              >>>>>Subject: [meu] Missing miva pages
              >>>>>
              >>>>>
              >>>>>How do I tell miva (Empresa 3.96) to run a designated script when it
              >>>>>can't
              >>>>>find the specified page (instead of the basic error message?). Ideally
              >>>>>the
              >>>>>error-handling page would have access to the requested URL
              >>>>>
              >>>>>--
              >>>>>Richard Grevers
              >>>>>Between two evils always pick the one you haven't tried
              >>>>>
              >>>>>
              >>>>>

              Comment


                #8
                Missing miva pages



                Well, first it's not the web servers responsibility to know
                if the file exists or not. All it knows is that whatever is
                that the file requested ends in .mv (or .mvc) and it should
                turn over processing to something configured in it's .conf
                file.

                That being said, you need to put in some error checking.

                If someone is typing in the missing file to the URL bar, or
                a remote file calling you, then you have to have a backup
                plan with 404 processing.
                If it's a script you're running and MvGOing a local file,
                use sexists().
                If it's a script you're running and MvCALLing a remote
                file, then check for MvCALL_ERROR.

                /ScottMc

                --- Richard Grevers <[email protected]> wrote:

                > On Wed, 12 Jan 2005 08:51:31 -0800, Bruce - Phosphor
                > Media
                > <[email protected]> gave utterance to the
                > following:
                >
                > > Well, its not miva that is giving you a page/script not
                > found
                > > error...its the web server.
                > > Typicially this is defined by the web server's main
                > config script. You
                > > could define it as
                > > not_found.mv and run Miva script inside that file...
                > >
                >
                > No Bruce - I already know how to run a mivascript for a
                > standard 404 error
                > from the webserver.
                > But this is not the case I am talking about. If you
                > request an url for
                > foo.mv and foo.mv does not exist, Miva generates a one
                > line syntax error:
                > Unable to open path/foo.mv
                > Of course it also does the same thing if you make an MvDO
                > call to a
                > nonexistant script in the middle of a script.
                > It is indeed curious that the server doesn't check the
                > existence of the
                > URL before handing it to Empresa (or Miva Mia where the
                > same thing
                > happens) but it has happened to me on every server where
                > I've used Miva
                > for the past 6 years.
                > It prevents a graceful death.
                > Since my initial post, I've been right through the
                > Empresa config
                > documentation, but I can't see anything which would help.
                >
                >
                >
                > >
                > >> -----Original Message-----
                > >> From: [email protected]
                > [mailto:[email protected]]On
                > >> Behalf Of Richard Grevers
                > >> Sent: Wednesday, January 12, 2005 1:50 AM
                > >> To: [email protected]
                > >> Subject: [meu] Missing miva pages
                > >>
                > >>
                > >> How do I tell miva (Empresa 3.96) to run a designated
                > script when it
                > >> can't
                > >> find the specified page (instead of the basic error
                > message?). Ideally
                > >> the
                > >> error-handling page would have access to the requested
                > URL
                > >>
                > >> --
                > >> Richard Grevers
                > >> Between two evils always pick the one you haven't
                > tried
                > >>
                > >>
                > >>

                Comment


                  #9
                  Missing miva pages



                  On Wed, 12 Jan 2005 13:37:03 -0500, Jonathan - Driftwood
                  <[email protected]> gave utterance to the following:

                  > The sample you offer is not giving a 404 error. But it is because of
                  > server config, nothing to do with Miva Script.
                  >
                  > Look closely at your Apache error page definitions for the site, or what
                  > might be there munging the results.
                  >
                  > The link you offered generates a 200 result instead of the 404 it should.
                  >
                  Hmm, this gets more interesting. After a discussion with my hosts I tried
                  a whole lot of nonexistant urls on miva powered sites

                  HOST SERVER RESULT CODE OUTPUT
                  miva.com Apache/2.0.40 (Red Hat Linux) 404 error page
                  driftwood.net Microsoft-IIS/5.0 404 miva's
                  error message
                  paen.net Apache/2.0.50 (Fedora) 404 error page
                  [1]
                  firework.co.nz Apache 200 miva's
                  error message [2]
                  amnet.com Apache/1.3.6 (Unix) 404 error page
                  + 404 for error document
                  truxoft.com Server: Apache/1.3.27 (Unix) 200 miva's
                  error message
                  phosphormedia.com Apache/1.3.31 (Unix) 200 miva's
                  error message
                  gilliganonline.com Apache/1.3.27 (Red-Hat/Linux) 200 miva's
                  error message
                  scotsscripts.com Apache/2.0.46 (Red Hat) 404 error page
                  mvcentral.com Apache/1.3.27 (Red-Hat/Linux) 200 miva's
                  error message

                  [1] A recent server from my host, running Ensim management
                  [2] A legacy server from my host, running plusmail management

                  Conclusion: It's starting to look like a bug in Apache prior to 1.3.6 - it
                  would be rather a coincidence if miva was returning different codes to
                  apache on precisely that mix of servers.

                  It matters to me because my CMS uses "real" urls (page calls cms script
                  which then includes page) and I need missing pages to die a lot more
                  gracefully. Looks like time to convince the client to upgrade servers.
                  --
                  Richard Grevers
                  Between two evils always pick the one you haven't tried



                  Comment

                  Working...
                  X