Can't log in as admin after install? Possible solution...

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
lalldrin
New Member
New Member
Posts: 8
Joined: Fri Jun 30, 2006 6:12 am

Can't log in as admin after install? Possible solution...

Post by lalldrin »

I banged my head for hours trying to figure out why a fresh install of CMSMS .13 on my production server wouldn't work, while the CMS worked fine on an "identically" configured dev server.

Turns out the servers were NOT configured the same, and the problem turned out to be in my php.ini file. The session.cookie_domain value was blank on my dev server, and set to a fully-qualified domain (i.e. 'www.somewhere.com') on my production server. The subdomain I was installing CMSMS in on the production server was NOT the same as that listed in php.ini. Relaxing the session.cookie_domain value to '.somewhere.com' fixed the problem.

In short, cookies were not making it to the browser. If you get stuck in a loop trying to log into the admin area (and are not getting a bad password message), scrutinize your cookie handling. Odds are your server is not generating cookies, or your browser is not accepting them.

Good luck.
mcfoggy

Re: Can't log in as admin after install? Possible solution...

Post by mcfoggy »

Hi,

I have exactly the same problem but i cannot have access to the php.ini file, i am hosted on a server and do not have enough rights on it.

Did someone find a solution ?

Thanks a lot for your help.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Can't log in as admin after install? Possible solution...

Post by Elijah Lofgren »

mcfoggy wrote: Hi,

I have exactly the same problem but i cannot have access to the php.ini file, i am hosted on a server and do not have enough rights on it.

Did someone find a solution ?

Thanks a lot for your help.
This may work:
1. Open include.php and add the following 3 lines to the top of the file just after the "<?php"

Code: Select all

$dirname = dirname(__FILE__);
session_set_cookie_params(0 , '/', $_SERVER['HTTP_HOST']);
session_save_path($dirname.'/tmp/cache');
The top of the file should then look like this:

Code: Select all

<?php
$dirname = dirname(__FILE__);
session_set_cookie_params(0 , '/', $_SERVER['HTTP_HOST']);
session_save_path($dirname.'/tmp/cache');

#CMS - CMS Made Simple
Let us know if this fixes your problem and maybe we can add a workaround similar to this for people that run into your problem.

Thanks,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
marlowmusic
New Member
New Member
Posts: 6
Joined: Mon Jul 28, 2008 10:34 pm

Re: Can't log in as admin after install? Possible solution...

Post by marlowmusic »

That did it for me! Yes please include that piece of code in the next version.
Locked

Return to “[locked] Installation, Setup and Upgrade”