Discussion:
[eGroupWare-users] Bad login or password after database moved to new server
Gerry Reno
2007-07-13 15:37:31 UTC
Permalink
We moved our databases to a new server and reconfigured all the config
files to point mysql access to this server. We put entries in php.ini,
header.inc.php, etc. We started up phpMyAdmin and everything worked, we
could access all accounts. We tested mysql access from the webserver
using the local command line client 'mysql' with the new host ip (-h
192.168.n.n) and all accounts could log in successfully. The only thing
that is not working is egroupware. Now when we try to login egroupware
gives us a "Bad login or password". So can someone give us the proper
voodoo to get egroupware working? Is there some cache that needs
purged? Are there cookies that have to be deleted?

Gerry
Gerry Reno
2007-07-13 20:23:41 UTC
Permalink
Post by Gerry Reno
We moved our databases to a new server and reconfigured all the config
files to point mysql access to this server. We put entries in php.ini,
header.inc.php, etc. We started up phpMyAdmin and everything worked, we
could access all accounts. We tested mysql access from the webserver
using the local command line client 'mysql' with the new host ip (-h
192.168.n.n) and all accounts could log in successfully. The only thing
that is not working is egroupware. Now when we try to login egroupware
gives us a "Bad login or password". So can someone give us the proper
voodoo to get egroupware working? Is there some cache that needs
purged? Are there cookies that have to be deleted?
Gerry
This is for egroupware 1.3-015.

Error on the page is "Bad login or password".

I inserted some error_log statements in the pconnect function and this
is what I'm seeing:

Can some egroupware programmer tell me if this is normal having all the
'referer:' added to all these?

[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argHostname=192.168.1.230:3306, referer:
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=someusername, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argHostname=192.168.1.230:3306, referer:
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5

I wouldn't think this is right.

Gerry
Gerry Reno
2007-07-13 21:37:39 UTC
Permalink
Post by Gerry Reno
Post by Gerry Reno
We moved our databases to a new server and reconfigured all the config
files to point mysql access to this server. We put entries in php.ini,
header.inc.php, etc. We started up phpMyAdmin and everything worked, we
could access all accounts. We tested mysql access from the webserver
using the local command line client 'mysql' with the new host ip (-h
192.168.n.n) and all accounts could log in successfully. The only thing
that is not working is egroupware. Now when we try to login egroupware
gives us a "Bad login or password". So can someone give us the proper
voodoo to get egroupware working? Is there some cache that needs
purged? Are there cookies that have to be deleted?
Gerry
This is for egroupware 1.3-015.
Error on the page is "Bad login or password".
I inserted some error_log statements in the pconnect function and this
Can some egroupware programmer tell me if this is normal having all the
'referer:' added to all these?
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=someusername, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
I wouldn't think this is right.
Gerry
Ok, it appears that the error_log function is adding the referer part
and it is not a part of the strings. So I use all the information in the
strings to form a local login with the 'mysql' client and everything
works fine.
mysql -u egroupware -pXXXXXXXXXX -h 192.168.1.230 -P 3306
mysql -u someusername -pXXXXXXXXXX -h 192.168.1.230 -P 3306

So I'm stumped as to why egroupware keeps rejecting the login.

Gerry
Kevin Scott
2007-07-13 22:49:10 UTC
Permalink
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
We moved our databases to a new server and reconfigured all the config
files to point mysql access to this server. We put entries in php.ini,
header.inc.php, etc. We started up phpMyAdmin and everything worked,
we
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
could access all accounts. We tested mysql access from the webserver
using the local command line client 'mysql' with the new host ip (-h
192.168.n.n) and all accounts could log in successfully. The only
thing
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
that is not working is egroupware. Now when we try to login egroupware
gives us a "Bad login or password". So can someone give us the proper
voodoo to get egroupware working? Is there some cache that needs
purged? Are there cookies that have to be deleted?
Gerry
This is for egroupware 1.3-015.
Error on the page is "Bad login or password".
I inserted some error_log statements in the pconnect function and this
Can some egroupware programmer tell me if this is normal having all the
'referer:' added to all these?
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=someusername, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
I wouldn't think this is right.
Gerry
Ok, it appears that the error_log function is adding the referer part
and it is not a part of the strings. So I use all the information in the
strings to form a local login with the 'mysql' client and everything
works fine.
mysql -u egroupware -pXXXXXXXXXX -h 192.168.1.230 -P 3306
mysql -u someusername -pXXXXXXXXXX -h 192.168.1.230 -P 3306
So I'm stumped as to why egroupware keeps rejecting the login.
Gerry
shot in the dark, but it looks like the databasename isn't being supplied
(arg Databasename=). are you sure you have the correct info in your
header.inc.php?
Gerry Reno
2007-07-13 23:37:34 UTC
Permalink
Post by Kevin Scott
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
We moved our databases to a new server and reconfigured all the config
files to point mysql access to this server. We put entries in php.ini,
header.inc.php, etc. We started up phpMyAdmin and everything worked,
we
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
could access all accounts. We tested mysql access from the webserver
using the local command line client 'mysql' with the new host ip (-h
192.168.n.n) and all accounts could log in successfully. The only
thing
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
that is not working is egroupware. Now when we try to login egroupware
gives us a "Bad login or password". So can someone give us the proper
voodoo to get egroupware working? Is there some cache that needs
purged? Are there cookies that have to be deleted?
Gerry
This is for egroupware 1.3-015.
Error on the page is "Bad login or password".
I inserted some error_log statements in the pconnect function and this
Can some egroupware programmer tell me if this is normal having all the
'referer:' added to all these?
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:11:06 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=someusername, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argUsername=egroupware, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argPassword=XXXXXXXXXX, referer: http://192.168.1.25/gw/login.php?cd=5
[Fri Jul 13 16:15:20 2007] [error] [client 192.168.2.102]
argDatabasename=, referer: http://192.168.1.25/gw/login.php?cd=5
I wouldn't think this is right.
Gerry
Ok, it appears that the error_log function is adding the referer part
and it is not a part of the strings. So I use all the information in the
strings to form a local login with the 'mysql' client and everything
works fine.
mysql -u egroupware -pXXXXXXXXXX -h 192.168.1.230 -P 3306
mysql -u someusername -pXXXXXXXXXX -h 192.168.1.230 -P 3306
So I'm stumped as to why egroupware keeps rejecting the login.
Gerry
shot in the dark, but it looks like the databasename isn't being supplied
(arg Databasename=). are you sure you have the correct info in your
header.inc.php?
Thanks Kevin.

Here is what is in header.inc.php:
$GLOBALS['egw_domain']['00000001'] = array(
'db_host' => '192.168.1.230',
'db_port' => '3306',
'db_name' => 'my_db_name',
'db_user' => 'someusername',
'db_pass' => 'XXXXXXXXXX',
// Look at the README file
'db_type' => 'mysql',
// This will limit who is allowed to make configuration modifications
'config_user' => 'config',
'config_passwd' => 'XXXXXXXXXX'
);



my test code snippet:
$hostport="192.168.1.230:3306";
$user="someusername";
$pw="XXXXXXXXXX";
$link = mysql_pconnect($hostport, $user, $pw);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo "$user @ $hostport identified by $pw connected successfully";
echo "<br />";
mysql_close($link);


And here is some output from some php mysql_connect and mysql_pconnect
tests:
mysql_connect:
someusername @ 192.168.1.230:3306 identified by XXXXXXXXXX connected
successfully
egroupware @ 192.168.1.230:3306 identified by XXXXXXXXXX connected
successfully

mysql_pconnect:
someusername @ 192.168.1.230:3306 identified by XXXXXXXXXX connected
successfully
egroupware @ 192.168.1.230:3306 identified by XXXXXXXXXX connected
successfully


So using PHP you can connect successfully with the moved database with
both egroupware and the user accounts. I've tried to follow the logic
behind when "Bad login or password" is issued but have not been
successful in tracing it. I don't think it is the connect, but something
else.


Gerry
Gerry Reno
2007-07-14 00:12:05 UTC
Permalink
Post by Gerry Reno
$hostport="192.168.1.230:3306";
$user="someusername";
$pw="XXXXXXXXXX";
$link = mysql_pconnect($hostport, $user, $pw);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo "<br />";
mysql_close($link);
And here is some output from some php mysql_connect and mysql_pconnect
successfully
successfully
successfully
successfully
So using PHP you can connect successfully with the moved database with
both egroupware and the user accounts. I've tried to follow the logic
behind when "Bad login or password" is issued but have not been
successful in tracing it. I don't think it is the connect, but
something else.
Gerry
I checked the connection return codes in adodb-mysql.inc.php and the
connections are all succeeding but still I am getting "Bad login or
password". So I don't understand what the problem is.

For reference, in php.ini I added the new database host IP and port as
the defaults (they were blank previously). And I changed all the domain
entries in header.inc.php from localhost to the new IP. And apparently
that has made the wheels come off! Must have hit some untested logic path.

Gerry
Gerry Reno
2007-07-14 00:22:10 UTC
Permalink
Post by Gerry Reno
Post by Gerry Reno
$hostport="192.168.1.230:3306";
$user="someusername";
$pw="XXXXXXXXXX";
$link = mysql_pconnect($hostport, $user, $pw);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo "<br />";
mysql_close($link);
And here is some output from some php mysql_connect and mysql_pconnect
successfully
successfully
successfully
successfully
So using PHP you can connect successfully with the moved database with
both egroupware and the user accounts. I've tried to follow the logic
behind when "Bad login or password" is issued but have not been
successful in tracing it. I don't think it is the connect, but
something else.
Gerry
I checked the connection return codes in adodb-mysql.inc.php and the
connections are all succeeding but still I am getting "Bad login or
password". So I don't understand what the problem is.
For reference, in php.ini I added the new database host IP and port as
the defaults (they were blank previously). And I changed all the domain
entries in header.inc.php from localhost to the new IP. And apparently
that has made the wheels come off! Must have hit some untested logic path.
Gerry
Kevin, got your latest reply after I sent this. I did a full tar of the
mysql directory and untarred in on the new server. Everything looks
perfect.
Gerry Reno
2007-07-14 02:33:58 UTC
Permalink
Thanks Kevin, yes it is Fri 13.


Ok, I wrote a small PHP program that uses the egroupware user accounts
and databases and I can read and write just fine to the database so it
has to be something other than the DB. It's either a config setting that
is required when your database is not on the same machine or there is a
logic bug somewhere. I am also beginning to suspect that it may be
related to the new database is 5.1.20-0. Maybe egroupware has a
compatibility issue with MySQL 5.1. As long as 5.1 has been in beta I
would have thought that any compatibility issues would have been found
already.

Gerry
Gerry Reno
2007-07-14 04:39:15 UTC
Permalink
I downloaded eGW 1.4 final and installed it using a new MySQL 5.1 db and
there are definitely problems. Used the header.inc.php.template to
create a new header file. Filled that in. I created the empty egroupware
database and granted permissions then I logged into setup and it went
the the install check and to header admin but it will not allow you to
create any domains. When you try to add a new one it immediately kicks
you back to the header admin login screen (manageheader.php). And if you
hit Continue button on the same page it takes you back to the check
install intro page. So you are in a loop that you can never get out of.
Even if I go Back to User Login it takes me to a .../home/index.php page
that says I need to update my header.inc.php to version 1.28 by running
setup/headeradmin which of course I have already done.

Also, on one link I get a Not Found error for
.../home/setup/manageheader.php. It's not under home.

So I think there is some problem running eGW with MySQL 5.1.

Gerry
Gerry Reno
2007-07-14 05:15:21 UTC
Permalink
Post by Gerry Reno
I downloaded eGW 1.4 final and installed it using a new MySQL 5.1 db and
there are definitely problems. Used the header.inc.php.template to
create a new header file. Filled that in. I created the empty egroupware
database and granted permissions then I logged into setup and it went
the the install check and to header admin but it will not allow you to
create any domains. When you try to add a new one it immediately kicks
you back to the header admin login screen (manageheader.php). And if you
hit Continue button on the same page it takes you back to the check
install intro page. So you are in a loop that you can never get out of.
Even if I go Back to User Login it takes me to a .../home/index.php page
that says I need to update my header.inc.php to version 1.28 by running
setup/headeradmin which of course I have already done.
Also, on one link I get a Not Found error for
.../home/setup/manageheader.php. It's not under home.
So I think there is some problem running eGW with MySQL 5.1.
Gerry
Taking a look at some of the changes in MySQL 5.1 from 5.0:
http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-5-0.html
and running a few greps through the egroupware code the following may
need addressed:

table_cache
read_only
utf8 columns
ENUM columns


Gerry

Kevin Scott
2007-07-14 00:04:47 UTC
Permalink
Post by Gerry Reno
Post by Kevin Scott
shot in the dark, but it looks like the databasename isn't being
supplied
Post by Gerry Reno
Post by Kevin Scott
(arg Databasename=). are you sure you have the correct info in your
header.inc.php?
Thanks Kevin.
$GLOBALS['egw_domain']['00000001'] = array(
'db_host' => '192.168.1.230',
'db_port' => '3306',
'db_name' => 'my_db_name',
'db_user' => 'someusername',
'db_pass' => 'XXXXXXXXXX',
// Look at the README file
'db_type' => 'mysql',
// This will limit who is allowed to make configuration modifications
'config_user' => 'config',
'config_passwd' => 'XXXXXXXXXX'
);
$hostport="192.168.1.230:3306";
$user="someusername";
$pw="XXXXXXXXXX";
$link = mysql_pconnect($hostport, $user, $pw);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo "";
mysql_close($link);
And here is some output from some php mysql_connect and mysql_pconnect
successfully
successfully
successfully
successfully
So using PHP you can connect successfully with the moved database with
both egroupware and the user accounts. I've tried to follow the logic
behind when "Bad login or password" is issued but have not been
successful in tracing it. I don't think it is the connect, but something
else.
Gerry
I'm not a Mysql Guru, maybe something happened with the dump and restore.
just for trouble shooting purposes, try to use the egw setup routine
(create admin and demo users) on that mysql server with a test database and
see what happens.
Kevin Scott
2007-07-14 00:39:25 UTC
Permalink
Post by Gerry Reno
Post by Gerry Reno
Post by Gerry Reno
$hostport="192.168.1.230:3306";
$user="someusername";
$pw="XXXXXXXXXX";
$link = mysql_pconnect($hostport, $user, $pw);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo "";
mysql_close($link);
And here is some output from some php mysql_connect and mysql_pconnect
successfully
successfully
successfully
successfully
So using PHP you can connect successfully with the moved database with
both egroupware and the user accounts. I've tried to follow the logic
behind when "Bad login or password" is issued but have not been
successful in tracing it. I don't think it is the connect, but
something else.
Gerry
I checked the connection return codes in adodb-mysql.inc.php and the
connections are all succeeding but still I am getting "Bad login or
password". So I don't understand what the problem is.
For reference, in php.ini I added the new database host IP and port as
the defaults (they were blank previously). And I changed all the domain
entries in header.inc.php from localhost to the new IP. And apparently
that has made the wheels come off! Must have hit some untested logic
path.
Post by Gerry Reno
Post by Gerry Reno
Gerry
Kevin, got your latest reply after I sent this. I did a full tar of the
mysql directory and untarred in on the new server. Everything looks
perfect.
Loading...