Thursday, October 28, 2010

Re: View Rendering & Ajax response Problem

On Thu, Oct 28, 2010 at 1:10 PM, Shadab Shaikh <rws.shadab@gmail.com> wrote:
> Dear All,
> I got some weird problem on today, problem is that I have setup a website,
> which is absolutely working fine in local server,
> but when I upload it on live server then its having some time problem for
> view rendering, some time browser seems busy...
> page is loading & loading... few ajax requests are not getting response,
> although its working perfectly on local server, no problem found there.
> I checked model association, it seems okay there.
> During debugging, I found that we have included all static variables in one
> file in /config/config.php like messages & website paths,
> we are loading this file in app_controller- before_filter() method.. once I
> am echoing any thing in this config file ( e.g echo "hello")
> then ajax request and response delay issue seems solved.. its working
> perfectly.. its giving all ajax response on live server
> and no loading there, but this trick will not work as by this way we may
> hurt cake php session mechanism.
> Can any body faced this kind of problem? Its appreciated if any body can
> share their view.
> Best Regards,
> Shadab Shaikh


It could be that you've got a lousy connection to the live server. Or,
maybe it has something to do with whatever routines you're running in
those controller actions being requested by the AJAX calls. Can't
really speculate further than that. Try adding some $this->log(...)
calls in those actions to ensure that Cake is receiving the request(s)
and also what's happening in the method.

And if you're loading config.php on every request you should put all
of that stuff in bootstrap.php as that's what it's for. You'll cut
down on some overhead.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

No comments: