I guess it's time for ask help.
My zend 2 action called twice. But it does not get called twice if it is internet Explorer.Tried to disable firebug but still the same.I saw other threads but did not find any suitable solution for me.
Update:
The other thread I have seen that seems to be useful is
Zend 2 Action get called twice
But the problem does not go away.
Related
Generally my application response times are good and pages load quickly. However login, using Zend_Auth with mysql db, takes an age compared to other tasks. I'm wondering has anyone else encountered this?
If not can anyone suggest a good way to debug and find the cause of the slow down?
FYI most pages are rendered under a second after their link is clicked whereas login takes around 7 seconds.
First you need to figure out what is causing slowdown. Add this to your application.ini:
resources.db.setDefaultTableAdapter = 1
resources.db.params.profiler.enabled = true
resources.db.params.profiler.class = Zend_Db_Profiler_Firebug
Then use Firefox+Firebug+FirePHP to see (in Firebug Console) list of all queries. Maybe one of them is really slow? Or maybe you make a lot of them?
Other thing to do is to check Net tab (Firebug) with 'keep changes' turned on to see if you don't make too many redirects or maybe some JS files are slowing down downloading page?
Last step is to install XDebug and run your login with XDEBUG_PROFILE parameter and then use KCacheGrind tool to see what is happening during login and what takes most time.
(Check manual)
I am trying to port a WinForms app for use with Mono, and I've recently noted that calling Form.Show() from another form will either do nothing or cause the new form to flash and disappear. I read something about the new form needing a message pump, which is accomplished with Application.Run(), but that's already been called. Any idea why this doesn't work? I can't use ShowDialog because my program relies on events fired by completed async tasks, and I don't want to block a ton of extra threads that will be done right after the Show call.
Have you tried to hide your current form before showing/displaying your new one?
Seems to me like your form is indeed being displayed but for some strange reason it's being delegated to the background. Worth a shot.
I am facing a 500 Server Error and I see that many people here have had this problem and it can be too broad so I would like to ask my question differently.
I have confirmed with my host that the server is fine and if I replace content of index.php in public_html it shows everything is working. The problem seems to be in my script/environment and I am trying to track it down. My question is which are the common paths to check?
I have confirmed that its going through application.ini fine, the front controller plugin is fine (I have 1), the routing is working fine but it doesnt get as far as the IndexController which I am testing with.
I have tried to wrap $application->bootstrap()->run(); in a try-catch but this didnt help. Any help with how to troubleshoot such an issue appreciated. I am trying to track through what the application is doing to find where it fails.
I solved this problem. Turns out I had an infinite loop in my application in one model. I traced through the dispatch process until I narrowed down to the line that was causing trouble and removed it. Was helpful to me in walking through what the application does step by step and ticking off everything.
Our FB App page is being loaded multiple times on IE 6 and 7, with the &fb_xd_fragment parameter appended. This is only happen when the FBInit method is called.
I saw a lot of complains about this issue, but I couldn't understand how to eliminate the multiple calls, or why it only happen in IE.
I've tried the 'solution' proposed in here but it didn't help - the page is being loaded several times.
I will appreciate any info on the subject.
Im hours and hours finding why one of my ZEND plugin sometimes running twice (depends on URL)
Note that my plugin has preDispatch and postDispatch methods and when I debugging the code it works like this:
MY_Plugin:preDispatch (echo $_SESSION['DBG'] has value)
MY_Plugin:postDispatch (unset($_SESSION['DBG']))
and then again
MY_Plugin:preDispatch (echo $_SESSION['DBG'] not exist)
MY_Plugin:postDispatch
This is part of bootstrap code
$_SESSION['DBG'] = 'value';
$MYrouter = new MY_Router_MyRouter();
$frontController->setRouter($MYrouter);
$frontController->registerPlugin(new MY_Plugin());
Do you have any suggestion how this could occur or how can I simulate this.
Thanks for any suggestion
Cervenak
Thanks guys for lot of valuable hints.
Now watch my story :)
First I had turned off showing exceptions (parameter False). So I switch them ON to see exception notification.
$frontController->throwExceptions(true);
Than I saw that I dont have uploaded controller and view files. After uploading them ZEND started to work corectly.
Good to know to have this direction set ON during debugging. You could probably save hours.
The dispatcher loop most likely running twice (the controller is dispatched twice). Possible causes:
using action view helper
calling _forward
redirector action helper
manually calling dispatch()
dispatch loop aborted and started again (eg. resetting request params)
Also, take a look at this ZF flow diagram (hotlinked from php-professionals.com)
Another reason could be an missing favicon.ico :-)
If the Apache cant find it, it fires a second request.