NYCPHP Meetup

NYPHP.org

[nycphp-talk] Intermittent Header() Redirect Failures

Jeff Slutz jeff at jeffslutz.com
Fri Sep 24 12:00:07 EDT 2010


I have run into a similar issue many times and every time it has boiled down
to accidental output to the screen before the header is called.  It was hard
to trace because the output was actually blank space before the first <?php
or after the last ?> of an included file.  Could it be that 5%-30% run
through a specific function or get a certain include file that the others
don't get before they're redirected?

Hope this is helpful and not an overly simplistic understanding of the
issue.

JS
--
Jeff Slutz
JSLEUTH LLC
3242 44th ST APT 3F
Astoria, NY 11103
c. 970.443.9390
jeff at jeffslutz.com


On Fri, Sep 24, 2010 at 11:45 AM, J. T. Gray <jtg at intarcorp.com> wrote:

> This is an odd one, but I'm hoping someone here can shed some light on this
> for me...  I have two sites on different dedicated servers and am passing
> visitors from one to another, based on specific actions.  To do this, I use
> Header("Location:  http://www.foo.com"); and successfully redirect the
> majority of users.  However, anywhere from 5-30% of traffic never makes it
> to the other site, according to the apache logs on each.  I'm unable to
> duplicate the problem, as it seems to only happen under a real life load
> (moderate, though, not heavy), but I have visitors who show up in the logs
> for box 1 and not box 2.  I added a Try {} Catch {} block to the header
> redirect, to collect more useful troubleshooting details, but I never got a
> single alert, suggesting the php redirect was successful.
>
> I find it hard to accept that 5-30% of traffic simply won't make it to its
> destination without a trace, but I can run test after test of actual traffic
> and see that, even in the small tests, many visitors are not redirecting.
> Does anyone know why this would happen and/or what's happening and/or how to
> set up a good test to trace visitors from one site to another?
>
> Thanks,
> JT
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100924/2677faa8/attachment.html>


More information about the talk mailing list