SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    how do i get to see output before internal server error without halting the code?

    not sure if i'm being silly or not but i can't work out how to find this bug. code which used to successfully parse some html is now giving an internal server error. i guess the html being parsed has changed in such a way to make my code go wrong -- some loop is looping for ever probably. if i put in echo '<h1>here</h1>'; even right at the start of the code that doesn't get output, just the internal server error. if i put exit(); after the echo then it outputs, but obviously ends (before the bug). if i put flush(); instead of the exit() it's as if the flush() isn't there -- internal server error is output without 'here' being output. how do i get to see output before internal server error without halting the code?

    thanks

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try writing everything that you echo or print to a file as well as echoing it. Then you should be able to see what's been written to the file, even though you won't see anything in the browser
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ok, thanks. i've never had to do that before and i'm sure i've had internal server errors before, and i'm sure outputting stuff then worked -- seems something has changed. could be wrong though. anyway, use writing to file. thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •