Announcement

Collapse
No announcement yet.

MvCAPTURE and 500 Internal Server Errors

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

    MvCAPTURE and 500 Internal Server Errors

    Ok, I'm getting 500 Internal Server Errors on various MvCAPTURE tags.

    Are there any rules about MvCAPTURE?

    I am using MvDO insidie the MvCAPTURE.

    Inside the MvDO there are some MvDO shortcuts via [ 'somefile.mvc' ].some_function() style calls.

    The file I'm calling is also calling functions from other files.

    Basically, it's as spaghetti as it gets but it should still work because if I simply MvEVAL the thing I'm trying to MvCAPTURE, it is displayed on the screen without any problem.

    Any ideas?
    Last edited by Scot - ScotsScripts.com; 02-13-15, 04:00 PM.
    M.A.D.* since 1997

    http://www.scotsscripts.com

    *miva application developers

    #2
    Re: MvCAPTURE and 500 Internal Server Errors

    If the total amount of text being captured is large, it can cause weird errors. I had a similar problem once with a string variable that had grown to, I think, a few megabytes in length.

    Hope that helps --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    Comment


      #3
      Re: MvCAPTURE and 500 Internal Server Errors

      Capture size is definitely not an issue, at the most I'm getting a couple lines of CSV style info. I bet it has to do with the "inline" mvdo's- [ 'somefile.mvc' ].somefunction()

      I've seen those throw internal server errors (and compile errors) when things get a few levels deep.
      M.A.D.* since 1997

      http://www.scotsscripts.com

      *miva application developers

      Comment


        #4
        Re: MvCAPTURE and 500 Internal Server Errors

        Right, I've seen "500" errors triggered by infinite loops in the code.
        Kent Multer
        Magic Metal Productions
        http://TheMagicM.com
        * Web developer/designer
        * E-commerce and Miva
        * Author, The Official Miva Web Scripting Book -- available on-line:
        http://www.amazon.com/exec/obidos/IS...icmetalproducA

        Comment


          #5
          Re: MvCAPTURE and 500 Internal Server Errors

          Weird thing is that it's not a loop situation. Basically if I MvCALL the same script with the same variables it works without issue, the csv data line is displayed, but if I change that so I MvCAPTURE an MvDO (or inline MvDO) so I can do it locally, because MvCALL doesn't work locally for me, that's when the internal server error comes up. It's annoying but not a huge deal, I just expand my testing situation to an online sandbox and in the end it's probably better because I'm using the exact same code that I would be in a live situation.
          M.A.D.* since 1997

          http://www.scotsscripts.com

          *miva application developers

          Comment


            #6
            Re: MvCAPTURE and 500 Internal Server Errors

            Are you mvdoing to an assign and then evaling or evaling directly into the mvcapture function?
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              Re: MvCAPTURE and 500 Internal Server Errors

              Hi Scot,

              can it be that your MvDOs can't find the mv-files or called functions? Or is it possible that within an MvDO-function an MvEXIT is nested? The compiler wouldn't catch this, but it could crash Empresa, as every MvCapture needs to be closed.

              Just two possibilities.

              Markus
              Emerald Media, Trade & Technology USA/Germany
              Professional Miva Programming since 1998
              Home of the Emerald Objects Application Server (EOA)
              Multi-dimensional CRM, CMS & E-Commerce

              http://www.emeraldobjects.com
              http://www.sylter-seiten.com

              Comment


                #8
                Re: MvCAPTURE and 500 Internal Server Errors

                Thanks for the info, it's definitely in the realm of possibility that there's an MvEXIT somewhere in the loop, didn't think about that. However now I'm going the long way around and updating files online for proper testing of the funcs. MvCAPTURE/MvDO were shortcuts so I didn't have to MvCALL things during testing. In the end, consistency with my testing/development will save more time than a few corner cutting MvCAPTURES will!
                M.A.D.* since 1997

                http://www.scotsscripts.com

                *miva application developers

                Comment


                  #9
                  Re: MvCAPTURE and 500 Internal Server Errors

                  Did you check that you where producing MvDo content INTO the mvcapture function. My understanding is that this is like a 'separate' display (screen) area. In order for MvCapture to "See" content, it has to be eval'ed INTO the mvcapture 'display'...does that make sense? (And anyone else want to chime in as to this categorization?)
                  Bruce Golub
                  Phosphor Media - "Your Success is our Business"

                  Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                  phosphormedia.com

                  Comment


                    #10
                    Re: MvCAPTURE and 500 Internal Server Errors

                    Yeah, that's the beauty of MvCAPTURE. What I like using it for most is MvCALL'ing remote scripts that need to pass back a little bit of data. I used to get logical with s.callvalue, but with MvCAPTURE it's all right there for parsing at your leisure. As for the internal server errors, who knows? Part of it might be simply because I'm working on my own ubuntu linux install in a vmware box and I basically live with the fact that some things don't work right (in Merchant, for example, imagemachine is completely broken and store searches are case sensitive for some reason.)
                    M.A.D.* since 1997

                    http://www.scotsscripts.com

                    *miva application developers

                    Comment

                    Working...
                    X