first admin/admin login failed workaround

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
chrime
Posts: 2
Joined: Mon Sep 05, 2005 9:56 am

first admin/admin login failed workaround

Post by chrime »

If you have the same problem and don't know what's wrong with your php.ini or apache configuration try this one:

Open config.php and go to:

Code: Select all

	/* initilize php session */
	session_start();
Before these lines add this:

Code: Select all

/* cookie workaround. these lines maybe optional. */
	if (isset($_COOKIE['PHPSESSID'])) session_id($_COOKIE['PHPSESSID']);
After session_start add this:

Code: Select all

	/* cookie workaround */
	header("Set-Cookie: PHPSESSID=".session_id()."; path=/; domain=".$_SERVER["HTTP_HOST"]."; expires=".gmstrftime("%A, %d-%b-%Y %H:%M:%S GMT", time() + 9600));
I hope this works as perfect as it did on our production servers.
Maybe you have to look at your php.ini if PHPSESSID is your session.name.

A few words to the cacti team:
IT'S NOT THE RIGHT WAY TO TRUST ON COOKIES!
Bad boys bad boys :D
dameloong
Posts: 5
Joined: Tue Sep 27, 2005 5:33 am

Post by dameloong »

i tried this as well ..but it still doesn't work
i dropped the database ...and re-create again...still the same :o
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: first admin/admin login failed workaround

Post by rony »

chrime wrote:A few words to the cacti team:
IT'S NOT THE RIGHT WAY TO TRUST ON COOKIES!
Bad boys bad boys :D
I don't agree, but everyone has thier opinions... :)

dameloong, as for your issue, please post something in the general forum and people will try to help you. Posting it in how/to is really not the right place.
[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]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests