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.
Can't log in as admin after install? Possible solution...
Re: Can't log in as admin after install? Possible solution...
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.
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.
- Elijah Lofgren
- 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...
This may work: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.
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');
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
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. 

-
- New Member
- Posts: 6
- Joined: Mon Jul 28, 2008 10:34 pm
Re: Can't log in as admin after install? Possible solution...
That did it for me! Yes please include that piece of code in the next version.