Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: php errors

  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    399
    Thanks
    33
    Thanked 7 Times in 7 Posts

    php errors

    i sometimes got php errors on my web page like this:

    Code:
    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/102/sdb/b/5/lastmarch/chat_php_mysql.php on line 11
    
    Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /mnt/102/sdb/b/5/lastmarch/chat_php_mysql.php on line 15
    
    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/102/sdb/b/5/lastmarch/chat_php_mysql.php on line 22
    
    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/102/sdb/b/5/lastmarch/chat_php_mysql.php on line 31
    
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/102/sdb/b/5/lastmarch/chat_php_mysql.php
    this is actually caused by a server latency, i would like to know if it's possible to echo those messages in a place of my choice?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Use the display_errors php.ini setting to control what is displayed.

    http://us.php.net/manual/en/errorfun...display-errors

    And, you should be handling errors better than how your script is handling them, based on that output.


  •  

    Posting Permissions

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