IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
PHP Warning Errors
Adam
post Dec 4 2005, 03:42 PM
Post #1


WSF Admiral
**********

Group: Admin
Posts: 10,514
Joined: 25-June 05
Member No.: 5



Question :

My website is having warning error messages at the top of the browser EG :

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****/public_html/manager/include/admin.security.php on line 8

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****/public_html/manager/quickstats.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home/****/public_html/manager/include/admin.security.php:8) in /home/****/public_html/include/common.function.php on line 29

Answer :

These are only warning errors, Which do not stop the execution of the script and most of these are designed to error as its used for security, Although if your on a server which has E_ALL (all errors display) this can be very annoying.

There are 2 ways to solve this, Im only going to show you one as its the simplier of the 2.
Open up your mysql_config.php file and it should look something like this :

CODE
<?php

$user = "username";
$passwrd = "password";
$host = "localhost";
$db = "database";

?>


Add the following code to the top of that file just below the error_reporting(0);
So it should look like this :

CODE
<?php
error_reporting(0);
$user = "username";
$passwrd = "password";
$host = "localhost";
$db = "database";

?>


This disables all errors messages, You can configure this value if you wish critical errors to display. For more information about this function can be found here.

Regards,
Adam
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2024 - 03:00 PM