A bit off topic, but I was taught to always structure your code so
that execution terminates by falling out the bottom of you routines
(i.e. no early exit points). For one, it makes more logical sense in
execution flow and is typically easier to maintain. So if you have any
clean-up code at the end that needs to execute every time, early exits
will bypasses that. By doing it that way, whenever I issue a redirect
statement, there's not further code to execute...it falls out the
bottom, and there's no need for an exit() call.

Am I missing something? I'm first a VB programmer so what do I
know :). Although my advice is good advice in that environment, I may
be wrong in server-side scripting and web programming.

On Jun 29, 6:13 am, "DJ Spark" <[EMAIL PROTECTED]> wrote:
>    I had this problem a few times, when redirecting to the same URL
> with a different variable
> /movies/count_votes/
> when it finished, i redirected to the same action, to update other rows
> /movies/count_votes/500
> /movies/count_votes/1000
> and so on.
>   The problem is, if i didn't put an exit(); after the redirect,
> apache/php went bonkers, and gave a 404 due to memory problems, i
> guess (i don't recall the right text on the error log, but was
> something about 'too many children' , and i have none :)
>   try that!
>   (the exit, not the child making)
>
>  spark
>
> On 6/29/07, RLR <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I am having a tough time tracking down what is wrong!
> > The problem seems to be two fold:
>
> > I am using an auth component from the bakery which I load via the
> > beforeFilter in app_controller and redirect to "/auth/" and present a
> > login view if no vaild session user can be found.
>
> > When I access the app with FiireFox the browser aborts with the
> > message:
> > ---
> > "The page isn't redirecting properly:
> > Firefox has detected that the server is redirecting the request for
> > this address in a way that will never complete.
> > *   This problem can sometimes be caused by disabling or refusing to
> > accept cookies."
> > ----
>
> > When I disable the auth section in app_controller I get a 404 message
> > from FireFox in the view area, although the layout is loaded
> > correctly. I changed the debug setting in core.php to DEBUG=2. The 404
> > errors remaind and no debug info in FireFox. The apache error log is
> > empty.
>
> > I am running out of ideas.
>
> > Thanks
> > RLR
>
> --
> [livesets]http://djspark.com.br/
> [web]http://sydi.net
> [filmes]http://melhoresfilmes.com.br


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to