strange inability to re-direct to PHP page

strange inability to re-direct to PHP page

Posted by: cybohemia
Posted on: 2009-07-25 10:11:00

A short while ago, web site I'm developing suddenly started to give me "404 Not Found" errors when it goes to PHP pages...but only for the first time it tries to go to that page. When I refresh the browser (Internet Explorer), the page loads fine so the page is actually there, just not getting served with the first request.

I tried it in Firefox and I see a stray <Br> character at the end of the URL. When I delete the trailing <Br> things work. I'm not sure why the trailing <Br> is getting inserted.

It's very strange and any thoughts and help would be greatly appreciated!


Re: strange inability to re-direct to PHP page

Posted by: Atropos7
Posted on: 2009-07-25 13:07:00

In reply to:

It's very strange and any thoughts and help would be greatly appreciated!


Well it's not strange because you can encode device control characters in a URL string. Unless you really mean to say it is a
HTML tag you see and not a CR or LF character. Either way you're going to need to review your PHP code or whatever it is that generates the HTML.





Customer since 2000 cool openvein.org

Re: strange inability to re-direct to PHP page

Posted by: cybohemia
Posted on: 2009-07-26 06:58:00

Actually, it is strange because I am not encoding any control characters in the links.

In fact, this even happens to the home page, index.php - when the user types site.com/home there is an implicit redirect to index.php and, even then, stray characters are appended.

And, also, this only started happening last week - everything was ok prior to that and no relevent changes were made.

Again, any help is appreciated for this strangeness.

Re: strange inability to re-direct to PHP page

Posted by: erikjacobsen
Posted on: 2009-07-26 12:01:00

A link to your site ?

Re: strange inability to re-direct to PHP page

Posted by: cybohemia
Posted on: 2009-07-26 17:26:00

Ah - thanks for asking! In the process of creating a link to a representative part of the site (my client didn't want me to post a link before the site was ready to go live although I needed to solve this to make it ready but, oh well...), I found the problem and it was my error (of course). I had an include file that did a bunch of overhead work, including re-directing if a session variable was not defined and that re-direction caused an error...but only on the first time through, which was confusing but that is when the session variable was not defined. Thanks again!



Tags: page loads