TheUnknown Posted January 6, 2008 Share Posted January 6, 2008 Anyone have any suggestions on tracking down what is causing one of my pages not to display anything but a white page Whats the best way to track down whats causing a nasty white page? the page will act like it wants to load and it will sometimes, but most of the time a white page is displayed... Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/ Share on other sites More sharing options...
chronister Posted January 6, 2008 Share Posted January 6, 2008 ini_set('error_reporting', E_ALL); Set the error reporting to show EVERYTHING for that page. Put this code at the top of the page and you will hopefully get an error to tell you what is wrong. Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/#findComment-431596 Share on other sites More sharing options...
kratsg Posted January 6, 2008 Share Posted January 6, 2008 Does this page often not show in a specific browser, such as IE? I've seen a few problems in PHP where the code is correct, but IE just won't show the page. In the end, I found the line that caused the problem, deleted it, rewrote it, and it worked fine. o_o Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/#findComment-431599 Share on other sites More sharing options...
TheUnknown Posted January 6, 2008 Author Share Posted January 6, 2008 Hmm Been running FF2 and no errors are displayed So i tried the latest version of Ie and i got this Warning: Invalid argument supplied for foreach() in t/public_html/torrents-upload.php on line 161 Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/#findComment-431606 Share on other sites More sharing options...
kratsg Posted January 6, 2008 Share Posted January 6, 2008 Sounds like you're putting a variable in your foreach where there should be an array... Maybe you can figure that part out, but you can go ahead and post code around that area and we'll see what's happening there. Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/#findComment-431647 Share on other sites More sharing options...
PFMaBiSmAd Posted January 6, 2008 Share Posted January 6, 2008 When the data that is submitted to a page changes with different browsers, it is due to the HTML markup being invalid, where one browser rendered the page ignoring the html errors, and the data got submitted, and the other bowser failed to render the page because of the html errors, and no data got submitted. Your php code also needs to validate every piece of data it receives to make sure it contains something, and output a meaningful validation error message like - "no data submitted for ...." and then stop execution rather than blindly continuing to attempt to operate on empty data. Doing so would have prevented the code from even executing a foreach() loop that did not contain an array. Quote Link to comment https://forums.phpfreaks.com/topic/84686-tracking/#findComment-431942 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.