Code: Select all
[Mon Mar 31 11:07:25 2014] [error] [client 180.76.5.27] PHP Notice: Constant DBHOST already defined in /var/www/vhosts/site.co.uk/httpdocs/dbconn.php on line 9
[Mon Mar 31 11:07:25 2014] [error] [client 180.76.5.27] PHP Notice: Constant DBUSER already defined in /var/www/vhosts/site.co.uk/httpdocs/dbconn.php on line 10
[Mon Mar 31 11:07:25 2014] [error] [client 180.76.5.27] PHP Notice: Constant DBPASS already defined in /var/www/vhosts/site.co.uk/httpdocs/dbconn.php on line 11
[Mon Mar 31 11:07:25 2014] [error] [client 180.76.5.27] PHP Notice: Constant DBNAME already defined in /var/www/vhosts/site.co.uk/httpdocs/dbconn.php on line 12I'm also getting occasional ones like this:
Code: Select all
[Mon Mar 31 11:07:25 2014] [error] [client 180.76.5.27] PHP Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /var/www/vhosts/site.co.uk/httpdocs/index.php on line 838include "databaseconn.php";
But should I be using require, or require_once? If it's "include" does that mean it constantly runs it, yet require is less hard on the DB? I'm not sure of the difference.
The closure of the connections happens right at the end, so the mysql_query issue is a real puzzle.