Hi,

I've just installed Apache 2.0.47 and finally got it working. 🙂 Much quicker than IIS, by the way, which I've now disabled. However, when I test out some links on my web pages, I get a strange problem. I get a dialog box message saying:

The instruction at "0x77c42e0a" reference memory at "0x00000000". The memory could not be "read".

The title of the dialog box is: Apache.exe - Application Error

I've tracked the problem down by trial and error to the fact that when there is an url parameter on the link without a value (e.g. ?parm=), then this problem happens and a "page cannot be displayed" page is displayed. It doesn't matter where in the set of parameters it occurs, just that it exists without a value. When it has a value, the link works fine and the next page is displayed.

Does anyone have an idea what may be causing it and how to solve the problem as I'm getting very frustrated and have run out of ideas to try.

Thanks if anyone can help.

Debbie-Leigh

    do you have an else that can catch it if there is no value, like:

    if (parm == "something")
    {
    do something
    }
    else if (parm == "something else")
    {
    do something else
    }
    else
    {
    do a default response
    }

    that may or may not be a fix to your problem

      Hi Stolzyboy,

      Thanks for the suggestion. I did think of that, but as I've seen plenty of urls with empty parameters, I would have thought that Apache should be able to handle this situation without falling over.

      I'd like to see if I can get to the root of the problem so I don't have to use a whole set of wrapper code for each url unnecessarily.

      I'm thinking it's possibly to do with some Apache configuration setting I've set wrongly, but I can't figure out which one.

      Debbie-Leigh

        yes, it should handle that situation, just thought you could use that as a quick fix til you get to the root of the problem, will do some digging myself, will post back if i find anything worthwhile, you can do the same, incase others have run into this problem

          also, what version of PHP are you using, and is it installed as an apache module or the cgi version

            Apache 2.0.47, PHP 4.3.2 and it is installed as a module, but I wouldn't have thought that it would be a PHP problem as the problem happens as soon as I click the link.

            Debbie-Leigh

              is this online anywhere so we can test it to see for ourselves what happens

                No, it's my own setup on my PC that I use for developing and testing before I upload everything. Sorry.

                Debbie-Leigh

                  Originally posted by Debbie-Leigh
                  No, it's my own setup on my PC that I use for developing and testing before I upload everything. Sorry.

                  Debbie-Leigh

                  hmmm... will keep looking, you may want to try the apache site and search for known bugs, and it could still be a php/apache problem also, saw a couple of the mem couldn't be read in the php bugs site, may be worth a read through there also

                    Oh, just thought this might help. This is the actual url it that is failing:

                    <a href="article_maint_ed.php?Type=e&Art=2&First=1&Last=1&Criteria=" title="Edit this record">Edit</a>

                    and this is the same one when criteria has something in:

                    <a href="article_maint_ed.php?Type=e&Art=2&First=1&Last=1&Criteria=article_id+IN+%281%2C2%29" title="Edit this record">Edit</a>

                    and this is the PHP code that produces the url:

                    <a href="article_maint_ed.php?Type=e&Art=<?php echo $aCols["article_id"]; ?>&First=<?php echo $getFirst; ?>&Last=<?php echo $intFirstMinus1; ?>&Criteria=<?php echo funLinkEncode($getCriteria); ?>

                    I can't spot that there's anything wrong with them, but it may be a case of woods and trees as I've spent so much time trying to sort it out.

                    As I said, I've tried putting criteria in every position in the url parameters, but the problem still happens when it has no data, no matter where it is.

                    Debbie-Leigh

                      Write a Reply...