Author Topic: Login Fails  (Read 21090 times)

Brian.Pflugrad

  • Guest
Login Fails
« on: February 19, 2008, 12:58:39 pm »
I realize there are quite a few of these threads out there, I have read most of them.  However, none of the other threads have solved my issue.

I have a Ubuntu Gutsy LAMP server running and have been trying to set up Calem.  After setup the admin login fails.

Here is the content of my calem.log:
2008-02-19 10:50:48,951 DEBUG main - sid=; aid=, Post data:
2008-02-19 10:50:48,951 INFO  main - Received request to launch: client/launchpad/CalemLoginLite.php, aid=
2008-02-19 10:51:07,431 DEBUG main - sid=; aid=, Post data: username=admin&password=admin_password&lang=&loadmode=gzip&theme=calem&debug=&calemAction=LoginAction
2008-02-19 10:51:07,431 INFO  MysqlHandler - calem db connection: user=calemeam, password=***, , connection=mysql:host=localhost;dbname=calemeam, persistent connection=Array
2008-02-19 10:51:07,431 DEBUG CalemUserDbo - fetchBySqlParam: select * from users where username=?, param='admin'
2008-02-19 10:51:07,431 DEBUG CalemPDOStatement - Query time:0.0014, the query=select * from users where username=?, params=array (
  1 => 'admin',
)
2008-02-19 10:51:07,431 ERROR main - Exception in processing login. Error msg=#0 /var/www/CalemEAM/server/include/core/database/CalemDbo.php(453): CalemDbo->_fetchBySql(Object(CalemPDOStatement), 'select * from u...')
#1 /var/www/CalemEAM/server/modules/admin/CalemUserDbo.php(49): CalemDbo->fetchBySqlParam('select * from u...', 'admin')
#2 /var/www/CalemEAM/server/modules/admin/CalemSecurityBo.php(62): CalemUserDbo::findByUsername('admin')
#3 /var/www/CalemEAM/server/modules/admin/soap/CalemLoginSo.php(67): CalemSecurityBo->verifyLogin('admin', 'admin_password')
#4 /var/www/CalemEAM/index.php(57): CalemLoginSo::doLogin('admin', 'admin_password')
#5 {main}

Clearly the exception in processing login is the culprit.
I did however add the debug lines from http://calemeam.com/apps/phpbb/viewtopic.php?t=213&sid=c7a428c20cb4062dd42f0c07e8a1888e
and for some reason that message is not showing up in the log.  I also reran setup step 7 just to be sure.

I had an issue with PDO being defined twice but fixed it.  Here is my apache error log:

PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Fatal error:  PDO: driver pgsql requires PDO API version 20060511; this is PDO version 20060409 in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_pgsql.so: undefined symbol: php_pdo_get_dbh_ce
PHP Fatal error:  PDO: driver pgsql requires PDO API version 20060511; this is PDO version 20060409 in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_pgsql.so: undefined symbol: php_pdo_get_dbh_ce
[Tue Feb 19 10:15:06 2008] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Feb 19 10:15:06 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3 mod_ssl/2.2.4 OpenSSL/0.9.8e configured -- resuming normal operations
[Tue Feb 19 10:19:51 2008] [notice] SIGHUP received.  Attempting to restart
[Tue Feb 19 10:19:51 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3 mod_ssl/2.2.4 OpenSSL/0.9.8e configured -- resuming normal operations


If I issue a phpinfo() command I show that these additional extensions are loaded:

/etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/pdo_pgsql.ini, /etc/php5/apache2/conf.d/pgsql.ini

And sure enough if I scroll down the page PDO and pdo_mysql show up:
PDO Driver for MySQL, client library version   5.0.45


Anyway, I am quite perplexed.  I used pecl to install pdo and pdo_mysql.  The admin line is in the database and the md5 hash matches fine.  Truly bizarre.

Thanks in advance.

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Login Fails
« Reply #1 on: February 20, 2008, 12:31:18 pm »
It seems that the database does not have the 'admin' user. The error msg is not clear about that, we have logged a request for it. So take a look at 'users' table in your database.

http://www.calemeam.com/apps/mantis/view.php?id=105
Calem Community Forum Admin

Brian.Pflugrad

  • Guest
Login Fails
« Reply #2 on: February 20, 2008, 03:17:05 pm »
That is the really odd thing.  Admin exists in the users table of the database fine, and the md5 hash of the password matches as well...
If you will look at this link you can see the result of a SELECT * query done on the users table:
http://gaernin.net/~gaernin/calem.sql.htm
(stored on my personal machine for convenience sake)

I did, however, remove the root password from my Calem configuration file after setup was complete since passwords in that file are stored in plain text. Could this be the issue?

Thanks!

calemadmin

  • Administrator
  • Calem Hero
  • *****
  • Posts: 300
    • http://www.calemeam.com
Login Fails
« Reply #3 on: February 21, 2008, 09:32:46 pm »
Removing root password should not cause this issue.

Before working on code level debugging, do one query on the database. If it works fine move to next step below.
select * from users where username='admin'

You may make a code change to show more error info (m-105 changes):
- Open CalemEAM/index.php in a text editor
- Change line 70 from:
$logger->error("Exception in processing login. Error msg=" . $ex);
to:
$logger->error("Exception in processing login. Error msg=" . get_class($ex) . ', ' . $ex->getMessage() . ", " . $ex);

-Save the file
Run login and check calem.log.
Calem Community Forum Admin