Jump to content

Archived

This topic is now archived and is closed to further replies.

Debbie-Leigh

Memory could not be read problem

Recommended Posts

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

Share this post


Link to post
Share on other sites

interesting. have you checked the apache site to see if this is a bug? perhaps look in the error log to see if any further details are provided.

Share this post


Link to post
Share on other sites

Hi,

 

I\'ve finally found the solution to this little problem and thought I\'d share it with everyone.

 

It turns out not to be an Apache problem, but what appears to be a bug in PHP. I had created a little subroutine to encode any text parameters before putting them into urls. Part of that routine uses the PHP function: html_entity_decode, which, it seems, cannot handle an empty string being passed to it. If it does encounter an empty string, then it seems to start behaving very badly and causes the problems outlined in my original post.

 

So, my solution was to test the passed string before using html_entity_decode and, if it is empty, then just pass it back as is.

 

What would be a perfect solution, though, is for this routine to be fixed, so I\'ll be passing this on to the PHP bods.

 

Hopes this helps.

 

Debbie-Leigh

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.