[solved] loop when login with admin/admin

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
brochet
Posts: 6
Joined: Fri May 09, 2008 3:31 am

[solved] loop when login with admin/admin

Post by brochet »

Hello, I have a problem when login with a fresh install :
when i click on "login", the localhost is asked for the query, but i come to the same page again and again but without any identication error

- the log file is empty of any problem
- the SQL database looks to be fine

here are the step i followed :
#mysqladmin --user=root password somepassword
#mysqladmin --user=root --password reload

#mysqladmin --user=root --password=somepassword create cacti
#mysql cacti < cacti.sql --user=root --password=somepassword
#mysql> GRANT ALL ON cacti.* TO apache@localhost IDENTIFIED BY 'cacti';

#mysql> flush privileges;


[root@Nagios cacti]# chown -R apache rra/ log/


in the etc/crontab I added the following line :

*/5 * * * * apache php /var/www/html/cacti/poller.php > /dev/null 2>&1

Finaly i made the allias to cacti directory in the httpd.conf :

Alias /cacti/ "/usr/local/cacti/"

<Directory "/usr/local/cacti/">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthType None
</Directory>

any Idea ?
:-?

PS : I make comment in front of sql command in order to prevent from bug on the forum
Last edited by brochet on Tue May 13, 2008 1:48 am, edited 1 time in total.
buck
Posts: 17
Joined: Tue Sep 04, 2007 10:09 am

Post by buck »

Did you edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

Code: Select all

$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "apache";
$database_password = "cacti";
Any apache log info?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Typically this is an issue with PHP session files.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aka search /etc/php.ini for the directory used for session files. Either make it writable for httpd's user or change it to a directory where httpd's user has write permission
Reinhard
brochet
Posts: 6
Joined: Fri May 09, 2008 3:31 am

Post by brochet »

buck wrote:Did you edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.

Code: Select all

$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "apache";
$database_password = "cacti";
Any apache log info?
here is the matching section of my config.php :

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "apache";
$database_password = "cacti";
$database_port = "3306";


but I don't found the apache.log


then
the path for the session file is /var/lib/php/session
now the directory session can be readable/writable by the user apache

and now it's work fine thanks à lot :D
IUT Vélizy
DUT réseau et télécom 2eme année
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest