SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    or die(mysql_error()) same as exit()?

    I have die(mysql_error()) on a lot of my queries and never had an issue with them exiting out of pages when some error comes back... until today.

    is that what die(mysql_error()) is capable of. If there is some error response from mysql, does it act like an exit() function and just exit out of the script at that point?

    feedback appreciated
    Cheers!
    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  2. #2
    SitePoint Member VSDan's Avatar
    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In PHP, die() is equivalent to exit(). However, not a recommended way to do it as very user-unfriendly. That said, what is happening today that was not happening before?

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NOrmally I have error_reporting off and it's never an issue unless we get some weird database issues, them we turn error_reporting back on and see what the mysql_error is. But now having mysql_error attached to queries that actually have queries just locks up the page with a no-response similar to have bad PHP coding. Instead of being given an error, we just get a blank page.

    Just upgraded servers, it sucks.
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  4. #4
    SitePoint Member VSDan's Avatar
    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would need to see some code. You have an error in your PHP code somewhere resulting in blank page because error reporting disabled.

  5. #5
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's worse than a blank page. If I try to view source of the blank there is nothing to open, as page does not exist. Like an entire breakdown.
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  6. #6
    SitePoint Member VSDan's Avatar
    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A PHP-generated page that is blank and content-less is typically due to PHP error when error reporting disabled.


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
  •