I have problems with a script which I try to install on a new website.
It says:
Warning: Cannot modify header information - headers already sent by (output started at /home/afghanhoun/domains/afghanhoundpedigrees.com/public_html/php_users/htdocs/users.inc:61) in /home/afghanhoun/domains/afghanhoundpedigrees.com/public_html/php_users/htdocs/processlogin.php on line 70
Usely it would mean there is a “whitespace” in the file. But cannot find any.
The line it refers to (line 61) is:
[php] if (!mysql_connect($USERS_DBHOST, $USERS_DBUSER, $USERS_DBPASS)) {[/php]
Which is part of this function:
[php]
function connect_to_users_db() {
global $USERS_DBHOST,$USERS_DB, $USERS_DBUSER, $USERS_DBPASS;
if (!mysql_connect($USERS_DBHOST, $USERS_DBUSER, $USERS_DBPASS)) {
// couldn't connect
echo "could not connect";
}
if (!mysql_select_db($USERS_DB)) {
// couldn't connect
echo "could not select";
}
}
[/php]
Now I have tried to remove that part of the script to see what happens than.
Than my error becomes:
Warning: access denied for user ‘root’@‘localhost’ (using password no)
Warning: mysql_select_db(): A link to the server could not be established
I have no idea what is wrong? And how to solve it.
Those same scripts work find on another website