Looking at screenshots your program looks very promising, however I can't fully evaluate it.
Default user/password results in "Login failed. Check credentials" message.
I've tried it with SQLite and MySQL with the same result.
Could you, please, suggest how to solve this?
Also, let's say I forgot admin's password, is there any other way to change it or create new one, without going to GUI?
Thank you in advance,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this is strange, after running the installation script you should be able to login as user admin with the password admin.
My first guess would be that it is a problem with your PHP installation. phpEquiMon uses the PHP session feature which must be enabled. If you're using a precompiled PHP binary this is most probably the case but with some distributions like Gentoo, this feature is disabled.
php -i | grep session should say something like this:
session
session.auto_start => Off => Off
session.bug_compat_42 => On => On
session.bug_compat_warn => On => On
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 4 => 4
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => Off => Off
session.use_trans_sid => 0 => 0
You can change this settings in your php.ini. Especially try setting use_cookies to On if it is off because phpEquiMon does not (yet) support inclusion of a session ID in its generated links and the trans_sid feature is known to cause problems.
Have you tried another browser with (session) cookies enabled?
If that does not help, you can check whether the installation script has a bug that screwed setting up the database:
"select password from authusers where id = 1;" on the database should return "$1$uC1er3WT$WWDKxP5zfplPQS7omlQ5l/" which equals the default password "admin".
If you only want to test phpEquiMon for yourself, I can suggest an easy workaround until the login problem is found:
In line 73 of index.php replace
if ( !$session->login( $_POST[ "username" ], $_POST[ "password" ] ) )
with
if ( !$session->login( $_POST[ "username" ], false )
That disables password checking.
Best regards
Chris
PS: Regarding your second question: I am planning a simple feature for 0.2 in case the/all admin(s) forget there password or someone removes all admins from the admin group. I think it will be a small seperate script that resets the password for a given user and adds it to the admin group.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I felt that your such detailed answer deserves me coming to work ;-) and test it in environment I experienced those issues.
The output of "php -i" command was almost like yours, except "bug_compat_42" and "save_path", but even setting them to values
you have, didn't change the behavior.
Default password in the database was exactly as you specified.
Changing index.php helped me to get in, but then I tried to change password from "Change your settings" (again to "admin" ;-)) and enable password checking, and... I couldn't log in again, with the same message "Login failed. Check credentials".
I don't know whether it's important, but I've noticed that there is missing last letter in message in the navigation bar (once you login with disabled password checking):
Logged in as admi - Your group(s): admi -
Also, believe me it doesn't bother me, just thought you might be interested in knowing how it looks like on other people's machines:
- name of program in truncated too - it's "phpEquiMo" in the middle of screen instead of "phpEquiMon"
- there are two messages in red at the top left corner:
Wrong database version. Expect unpredictable behavior.
ERROR: Last cronjob run did not finish cleanly. Contact admin.
- when I click on "logout" I got of phpEquiMon directory completely, e.g. "http://localhost/" instead of, I would expect ;-), "http://localhost/phpEquiMon/"
Just for full picture of my environment:
Fedora Core 6
SQLite version 3.3.6
Server version: Apache/2.2.3
used browser: Firefox 1.5.0.8
I hope my comments are not too annoying and won't discourage you from continuing this interesting project.
Thanks a lot for your time.
Best regards,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
of course, your comments are not annoying- I'm happy if someone is trying to use my software!
It seems like you are affected by an old bug that I saw some months ago: It is a bug with PHP PDO that cuts off the last character of each string that is returned in a result to a SQL query. Of course with this, your login difficulties are no miracle because actually you do not have an "admin" user and even if you would try to login with "admi" you could not because the password hash is not valid.
The bug is known upstream (http://bugs.php.net/bug.php?id=38976) and fixed in the latest Fedora version if the PHP bugtracker is right, so you could give a shot at an upgrade. Yet another stupid bug where one can only wonder how it made it into the stable RPM to be distributed to the users...
Do you have the same problem (last character truncated) when using MySQL too?
Concerning the two messages:
"Wrong database version. Expect unpredictable behavior.
ERROR: Last cronjob run did not finish cleanly. Contact admin. "
The first one is likely caused by the same bug the truncates the strings and not cause but symptom of the problem.
The second one says that you have not set up the cronjob for phpEquiMon yet. phpEquiMon uses a cronjob to do regular pinging of all machines and other fancy stuff if you enabled it (LDAP and WBEM queries for example).
It is also unrelated to the problem but when this problem is solved, you can add the cronjob (to the webserver user's crontab => crontab -u wwwrun -e):
*/5 * * * * /usr/bin/php /path/index.php cron
"- when I click on "logout" I got of phpEquiMon directory completely, e.g. "http://localhost/" instead of, I would expect ;-), "http://localhost/phpEquiMon/" "
That's okay, you can change phpEquiMon's redirection in the configuration (in the Admin Panel, called "Installation URL"). Though I should code an URL autodetection for the next version, shouldn't be hard to retrieve this from $_SERVER.
Best regards
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Christian,
Looking at screenshots your program looks very promising, however I can't fully evaluate it.
Default user/password results in "Login failed. Check credentials" message.
I've tried it with SQLite and MySQL with the same result.
Could you, please, suggest how to solve this?
Also, let's say I forgot admin's password, is there any other way to change it or create new one, without going to GUI?
Thank you in advance,
Michael
Hello Michael,
this is strange, after running the installation script you should be able to login as user admin with the password admin.
My first guess would be that it is a problem with your PHP installation. phpEquiMon uses the PHP session feature which must be enabled. If you're using a precompiled PHP binary this is most probably the case but with some distributions like Gentoo, this feature is disabled.
php -i | grep session should say something like this:
session
session.auto_start => Off => Off
session.bug_compat_42 => On => On
session.bug_compat_warn => On => On
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 4 => 4
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => Off => Off
session.use_trans_sid => 0 => 0
You can change this settings in your php.ini. Especially try setting use_cookies to On if it is off because phpEquiMon does not (yet) support inclusion of a session ID in its generated links and the trans_sid feature is known to cause problems.
Have you tried another browser with (session) cookies enabled?
If that does not help, you can check whether the installation script has a bug that screwed setting up the database:
"select password from authusers where id = 1;" on the database should return "$1$uC1er3WT$WWDKxP5zfplPQS7omlQ5l/" which equals the default password "admin".
If you only want to test phpEquiMon for yourself, I can suggest an easy workaround until the login problem is found:
In line 73 of index.php replace
if ( !$session->login( $_POST[ "username" ], $_POST[ "password" ] ) )
with
if ( !$session->login( $_POST[ "username" ], false )
That disables password checking.
Best regards
Chris
PS: Regarding your second question: I am planning a simple feature for 0.2 in case the/all admin(s) forget there password or someone removes all admins from the admin group. I think it will be a small seperate script that resets the password for a given user and adds it to the admin group.
Hi Chris,
I felt that your such detailed answer deserves me coming to work ;-) and test it in environment I experienced those issues.
The output of "php -i" command was almost like yours, except "bug_compat_42" and "save_path", but even setting them to values
you have, didn't change the behavior.
Default password in the database was exactly as you specified.
Changing index.php helped me to get in, but then I tried to change password from "Change your settings" (again to "admin" ;-)) and enable password checking, and... I couldn't log in again, with the same message "Login failed. Check credentials".
I don't know whether it's important, but I've noticed that there is missing last letter in message in the navigation bar (once you login with disabled password checking):
Logged in as admi - Your group(s): admi -
Also, believe me it doesn't bother me, just thought you might be interested in knowing how it looks like on other people's machines:
- name of program in truncated too - it's "phpEquiMo" in the middle of screen instead of "phpEquiMon"
- there are two messages in red at the top left corner:
Wrong database version. Expect unpredictable behavior.
ERROR: Last cronjob run did not finish cleanly. Contact admin.
- when I click on "logout" I got of phpEquiMon directory completely, e.g. "http://localhost/" instead of, I would expect ;-), "http://localhost/phpEquiMon/"
Just for full picture of my environment:
Fedora Core 6
SQLite version 3.3.6
Server version: Apache/2.2.3
used browser: Firefox 1.5.0.8
I hope my comments are not too annoying and won't discourage you from continuing this interesting project.
Thanks a lot for your time.
Best regards,
Michael
Hello Michael,
of course, your comments are not annoying- I'm happy if someone is trying to use my software!
It seems like you are affected by an old bug that I saw some months ago: It is a bug with PHP PDO that cuts off the last character of each string that is returned in a result to a SQL query. Of course with this, your login difficulties are no miracle because actually you do not have an "admin" user and even if you would try to login with "admi" you could not because the password hash is not valid.
The bug is known upstream (http://bugs.php.net/bug.php?id=38976) and fixed in the latest Fedora version if the PHP bugtracker is right, so you could give a shot at an upgrade. Yet another stupid bug where one can only wonder how it made it into the stable RPM to be distributed to the users...
Do you have the same problem (last character truncated) when using MySQL too?
Concerning the two messages:
"Wrong database version. Expect unpredictable behavior.
ERROR: Last cronjob run did not finish cleanly. Contact admin. "
The first one is likely caused by the same bug the truncates the strings and not cause but symptom of the problem.
The second one says that you have not set up the cronjob for phpEquiMon yet. phpEquiMon uses a cronjob to do regular pinging of all machines and other fancy stuff if you enabled it (LDAP and WBEM queries for example).
It is also unrelated to the problem but when this problem is solved, you can add the cronjob (to the webserver user's crontab => crontab -u wwwrun -e):
*/5 * * * * /usr/bin/php /path/index.php cron
"- when I click on "logout" I got of phpEquiMon directory completely, e.g. "http://localhost/" instead of, I would expect ;-), "http://localhost/phpEquiMon/" "
That's okay, you can change phpEquiMon's redirection in the configuration (in the Admin Panel, called "Installation URL"). Though I should code an URL autodetection for the next version, shouldn't be hard to retrieve this from $_SERVER.
Best regards
Chris
Hi Chris,
Everything you said was right.
I tested it on Fedora 7 machine and all worked right out of the box.
Thanks again for all your help,
And, please, keep up good work ;-)
Sincerely,
Michael
Thank you!
I think I'll add this problem/bug with PDO to the FAQ on the homepage.
If you have any other feature ideas or find bugs, feel free to tell me (either in this forum or in the SourceForge tracker). :-)
Best regards
Chris