a2jfreak Posted February 22, 2007 Share Posted February 22, 2007 I have a couple of PHP files that appear to freeze. There are no Errors/Warnings so I don't know what's wrong. Is there any way I can easily find out where it is freezing without having to put echo's throughout the code? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/ Share on other sites More sharing options...
trq Posted February 22, 2007 Share Posted February 22, 2007 Is there any way I can easily find out where it is freezing without having to put echo's throughout the code? Not really, are you sure you have error_reporting enabled and have also enabled display_errors? Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191606 Share on other sites More sharing options...
a2jfreak Posted February 22, 2007 Author Share Posted February 22, 2007 Yes, they are both turned on, along with display_startup_errors also. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191619 Share on other sites More sharing options...
trq Posted February 22, 2007 Share Posted February 22, 2007 Can we see the relevant code then? Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191622 Share on other sites More sharing options...
a2jfreak Posted February 22, 2007 Author Share Posted February 22, 2007 I'll try a few more things first and hopefully one will work. I just wish there were an easy way to see what was going wrong, as there has to be a reason PHP is freezing. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191653 Share on other sites More sharing options...
magic2goodil Posted February 22, 2007 Share Posted February 22, 2007 Look for loops that never end and such. Quite often that will cause php to freeze. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191658 Share on other sites More sharing options...
SharkBait Posted February 22, 2007 Share Posted February 22, 2007 yea when I ever run into an infinate loop it's like PHP is frozen but it just takes a really long time to time out Sometimes (depending n the browser) it will eventually ask you to save a file Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191664 Share on other sites More sharing options...
Ninjakreborn Posted February 22, 2007 Share Posted February 22, 2007 Asking you to save the file is normally caused by improper server configurations. Set error_reporting("E_ALL"); put that at the top of your scripts to see. If not, then place some echo's in, and see what is not working. See how far the script is working, there isn't an "easier" way to do it thought, debugging is debugging no mater how you look at it. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-191702 Share on other sites More sharing options...
a2jfreak Posted February 23, 2007 Author Share Posted February 23, 2007 Thanks for the replies. I had to leave unexpectedly yesterday and come in late today and that is why I did not have any more posts. I should post again within an hour or hopefully less saying it is fixed or with the offending code. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-192243 Share on other sites More sharing options...
a2jfreak Posted February 23, 2007 Author Share Posted February 23, 2007 I got it working. I added some stuff in a loop just to keep track of where in the loop it was freezing. Odd thing is, it no longer freezes. I still might post the code, if I can't figure out why what I did worked. Quote Link to comment https://forums.phpfreaks.com/topic/39690-php-freezing/#findComment-192315 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.