...

View Full Version : php errors



sybil6
03-13-2009, 09:16 PM
i sometimes got php errors on my web page like this:


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?

Fumigator
03-13-2009, 09:25 PM
Use the display_errors php.ini setting to control what is displayed.

http://us.php.net/manual/en/errorfunc.configuration.php#ini.display-errors

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum