Calem Community Forum
General => Setup => Topic started by: mikeyb on December 18, 2007, 05:25:44 pm
-
I just installed CalemEAM 2.0.1 on my WinXP box. I get the "Login failed. Please check your user name/password and try again." In my calem.log it says:
2007-12-18 14:56:18,071 DEBUG main - sid=; aid=, Post data:
2007-12-18 14:56:18,071 INFO main - Received request to launch: client/launchpad/CalemLoginLite.php, aid=
2007-12-18 14:56:25,630 DEBUG main - sid=; aid=, Post data: username=admin&password=admin_password&lang=&loadmode=gzip&theme=calem&debug=&calemAction=LoginAction
2007-12-18 14:56:25,630 INFO MysqlHandler - calem db connection: user=calemeam, password=***, , connection=mysql:host=localhost;dbname=calemeam, persistent connection=Array
2007-12-18 14:56:25,630 DEBUG CalemUserDbo - fetchBySqlParam: select * from users where username=?, param='admin'
2007-12-18 14:56:25,630 DEBUG CalemPDOStatement - Query time:0.0025, the query=select * from users where username=?, params=array (
1 => 'admin',
)
It looks like the password is not being forwarded as empty.
php_pdo.dll & php_pdo_mysql.dll are enabled; no errors in either my php error log or Apache error.log.
What am I doing wrong?
-
The logs look fine. Check out if the database has 'admin' in 'users' table.
-
'admin' exists and password = MD5('admin_password').
-
Great you compared password with its md5. You should take a look at code and add an extra log to figure out what was wrong. The login code is in file: CalemEAM\server\modules\admin\CalemSecurityBo.php
Open this file and add the following logging code right after line 62:
$ar=array(
$user ? 1: 0,
$user->getLoginAllowed(),
$user->getUsername()==$username,
$user->getPassword()==md5($password) );
$this->logger->debug('***' . var_export($ar, true));
Try login again and see why login failed thanks to the great flexibility and instant deployment of PHP.
-
OK, now the calem.log output looks like:
2007-12-19 10:11:09,578 INFO main - Received request to launch: client/launchpad/CalemLoginLite.php, aid=
2007-12-19 10:27:30,455 DEBUG main - sid=; aid=, Post data:
2007-12-19 10:27:30,455 INFO main - Received request to launch: client/launchpad/CalemLoginLite.php, aid=
2007-12-19 10:27:38,984 DEBUG main - sid=; aid=, Post data: username=admin&password=admin_password&lang=&loadmode=gzip&theme=calem&debug=&calemAction=LoginAction
2007-12-19 10:27:39,984 INFO MysqlHandler - calem db connection: user=calemeam, password=***, , connection=mysql:host=localhost;dbname=calemeam, persistent connection=Array
2007-12-19 10:27:39,984 DEBUG CalemUserDbo - fetchBySqlParam: select * from users where username=?, param='admin'
2007-12-19 10:27:39,984 DEBUG CalemPDOStatement - Query time:0.0017, the query=select * from users where username=?, params=array (
1 => 'admin',
)
2007-12-19 10:27:39,984 DEBUG CalemSecurityBo - ***array (
0 => 1,
1 => true,
2 => true,
3 => true,
)
2007-12-19 10:27:39,984 INFO main - Received request to launch: client/launchpad/CalemLoginLite.php, aid=
-
BTW, if I put a print after line 66 in CalemSecurityBo.php ...
[Line 61]
public function verifyLogin($username, $password) {
$user=CalemUserDbo::findByUsername($username); //User will not be null if found.
$succ=($user
&&$user->getLoginAllowed()
&&$user->getUsername()==$username
&&$user->getPassword()==md5($password));
printf("%s, %s, %s\n", $succ, $username, $password);
I get: '1, admin, admin_password'
-
The login problem is caused by issues with cache directories. See Mantis issue created for this incident.
http://www.calemeam.com/apps/mantis/view.php?id=82
You may try the following:
a) Execute Step 7 of the setup guide.
b) Verify that CalemEAM/server/cache/session, data and default are created and writeable.
-
I created the cache folders manually and now can log in, but I get a blank screen. In my php error log I get:
[19-Dec-2007 14:48:20] PHP Fatal error: Call to undefined function json_encode() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\CalemEAM\public\JsPkgCustom.php on line 71
and Firefox's Error Console shows:
aclGroup has no properties
http://localhost/CalemEAM/public/jsPkg.php?js=Calem&loadmode=gzip
I thought I saw this blank screen error elsewhere on the Forum, so I'll poke around and see if I find a reference to it.
-
You should execute Step 7 of the Setup Guide. It looks like that step was not performed during the setup which caused directories missing and cache not initialized.
-
In my PHP error log I got:
PHP Fatal error: Call to undefined function json_encode() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\CalemEAM\public\JsPkgCustom.php on line 71
PHP JSON package is an integral part of the PHP 5.2.x release, but not an integral part of my PHP 5.1.6 release. I downloaded the php_json.dll from http://aurore.net/projects/php-json/ (the Win32 version is at http://pecl4win.php.net/ext.php/php_json.dll), installed it into my php5\ext folder, and then added 'extension=php_json.dll' to my php.ini file.
A successful login now opens the Dashboard page.
Thanks for your help!
-
Congrats! Thanks for the tips about json_encode.