[solved] can't log in after clean install 1.2.3

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
ktc
New Member
New Member
Posts: 5
Joined: Tue Jan 15, 2008 5:02 pm

[solved] can't log in after clean install 1.2.3

Post by ktc »

I just downloaded and installed CMSMS 1.2.3. This was a clean install on localhost, new database, nothing carried over from any previous version. I cannot log into the admin area and can't figure out why. I already reset the username and password to 'admin' per http://wiki.cmsmadesimple.org/index.php/FAQ/Login but it still doesn't work.

Set up:
CMSMS 1.2.3
Apache 1.3x
MySQL 4.1
PHP 5.2.1 (reporting all errors)
cookies enabled
JavaScript enabled (though not required)
local URL is http://localhost/cmsmadesimple/admin/login.php

Enter username and password and hit submit. The login page just keeps coming back. There are no error messages shown on the page. I entered a bogus password to make sure it did something (anything!) and an error does show in that case. There are no error messages in the Apache error log. A /tmp session file is created containing
redirect_url|s:35:"/cmsmadesimple/admin/login.php";

I'm stumped. Is there a version incompatibility problem somewhere that might be causing this?
Last edited by ktc on Wed Jan 16, 2008 5:14 pm, edited 1 time in total.
nivekiam

Re: can't log in after clean install 1.2.3

Post by nivekiam »

You don't mention your Operating System (I'm assuming Linux)

Have you cleared you cookies and cache in your browser?  Do you have anything in an .htaccess file?
Pierre M.

Re: can't log in after clean install 1.2.3

Post by Pierre M. »

May be something wrong in your PHP sessions setup. Review it with phpinfo() : check the parameters, the paths...
Have a look at your http logS.
And try turning debug to true in config.php
Which supported admin browser are you using ?

Pierre M.
ktc
New Member
New Member
Posts: 5
Joined: Tue Jan 15, 2008 5:02 pm

Re: can't log in after clean install 1.2.3

Post by ktc »

Pierre M. wrote: May be something wrong in your PHP sessions setup. Review it with phpinfo() : check the parameters, the paths...
Not sure what could possibly be wrong with this. The path is what it should be, and session files are being written in there.
I've cleared /tmp as well as the cookies in my browser and started fresh numerous times already.

After the first login attempt there is one session file:
/tmp/session/sess_gnkjifl654mkle1p0kt6kon0k7
containing:
login_user_id|s:1:"1";login_user_username|s:5:"admin";login_cms_language|s:5:"en_US";
My browser has 2 cookies
1. Name: "CMSSESSID35ae6f58", contents: "gnkjifl654mkle1p0kt6kon0k7", path: /tmp/session
2. Name: "cms_language", contents: "en_US", path: /cmsmadesimple/admin/
Have a look at your http logS.
There are no errors in the Apache error log. When I turned on e_strict reporting, I got a bunch of warnings about deprecated references, using strftime(), and Declaration/method compatibilities, but no errors. BTW, I do hope those warnings will be cleaned up at some point.
And try turning debug to true in config.php
I'll post the debug logs below
Which supported admin browser are you using ?
I wasn't aware there were any particular limitations, but it's a Firefox equivalent (the latest Seamonkey, actually). Spoofing as Firefox 2.0 didn't change anything.

Here are the debug logs. This was after clearing out all cookies and session files, and submitting the login

Debug is on. Redirecting disabled... Please click this link to continue.
/cmsmadesimple/admin/login.php
Debug: (1.7000000000045E-005) - (773728)
loading smarty
Debug: (0.0044200000000001) - (1088608)
loading adodb
Debug: (0.0061160000000001) - (1184336)
loading page functions
Debug: (0.0087389999999999) - (1362472)
loading content functions
Debug: (0.011292) - (1570288)
loading pageinfo functions
Debug: (0.012166) - (1602824)
loading translation functions
Debug: (0.012819) - (1623912)
loading events functions
Debug: (0.014337) - (1724232)
done loading files
Debug: (0.02543) - (2537832)
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs
Error (0):
Debug: (0.029348) - (2604536)
(mysql): SELECT * FROM cms_userplugins
Error (0):
Debug: (0.055436) - (3165792)
(mysql): SELECT * FROM cms_modules ORDER BY module_name
Error (0):
Debug display of 'End of include':(0.08464) - (5041560)
Debug: (0.085232) - (5005432)
No session found.  Now check for cookies
Debug: (0.085281) - (5005640)
No cookies found.  Redirect to login.
Debug: (0.087889) - (5069392)
(mysql): SELECT user_id FROM cms_users WHERE username = 'admin' AND password = '21232f297a57a5a743894a0e4a801fc3' AND active = 1 AND admin_access = 1
Error (0):
Debug: (0.088229) - (5072856)
(mysql): SELECT username, password, active, first_name, last_name, admin_access, email FROM cms_users WHERE user_id = '1'
Error (0):
Debug: (0.08835) - (5066376)
Got user by username
Debug: (0.088395) - (5066600)
User Object
(
    [id] => 1
    [username] => admin
    [password] => 21232f297a57a5a743894a0e4a801fc3
    [firstname] => Admin
    [lastname] => User
    [email] => admin@example.com
    [active] => 1
    [adminaccess] => 1
)
Debug: (0.088443) - (5066896)
Starting login procedure.  Setting userid so that other pages will pick it up and set a cookie.
Debug: (0.088756) - (5073880)
(mysql): SELECT preference, value FROM cms_userprefs WHERE user_id = '1'
Error (0):
Debug: (0.089161) - (5075376)
(mysql): INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name, action) VALUES (1200423036,'1','admin','1','admin','User Login')
Error (0):
Debug: (0.090563) - (5103240)

(mysql): SELECT eh.tag_name, eh.module_name, e.originator, e.event_name, eh.handler_order, eh.handler_id, eh.removable FROM cms_event_handlers eh
        INNER JOIN cms_events e ON e.event_id = eh.event_id
        ORDER BY eh.handler_order ASC
Error (0):
Debug: (0.090912) - (5107760)
(mysql): SELECT version from cms_version
Error (0):


Here's the log after clicking on the redirect link back to login.php:

Debug: (1.6999999999934E-005) - (773040)
loading smarty
Debug: (0.0044379999999999) - (1087936)
loading adodb
Debug: (0.0061819999999999) - (1183664)
loading page functions
Debug: (0.008975) - (1361824)
loading content functions
Debug: (0.011535) - (1569616)
loading pageinfo functions
Debug: (0.01232) - (1602168)
loading translation functions
Debug: (0.012865) - (1623304)
loading events functions
Debug: (0.014395) - (1723576)
done loading files
Debug: (0.025886) - (2537152)
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs
Error (0):
Debug: (0.03) - (2603824)
(mysql): SELECT * FROM cms_userplugins
Error (0):
Debug: (0.057167) - (3164576)
(mysql): SELECT * FROM cms_modules ORDER BY module_name
Error (0):
Debug display of 'End of include':(0.087148) - (5040288)
Debug: (0.087827) - (5004160)
No session found.  Now check for cookies
Debug: (0.087881) - (5004368)
No cookies found.  Redirect to login.
Debug: (0.087967) - (5002600)
debug is:
Debug: (0.088513) - (5014184)
Debug in the page is:


After this there is a second file in /tmp/session, containing:
redirect_url|s:35:"/cmsmadesimple/admin/login.php";
The cookie in my browser named "CMSSESSID35ae6f58" now points to it, instead of the good cookie with my username in it.

OK, so it appears it can't find the cookie, but the question is why? I can't believe it can possibly matter, but this is on a WinXP box, so stick a drive letter on the beginning of the path names. I've been running this Apache set up for several years, and there isn't anything weird about it.
ktc
New Member
New Member
Posts: 5
Joined: Tue Jan 15, 2008 5:02 pm

Re: can't log in after clean install 1.2.3

Post by ktc »

I figured out the cause after having a similar problem with another script.
In php.ini, removing the explicit path name "/tmp/session" from

Code: Select all

session.save_path
got rid of the error. Don't know why this hasn't bit me before, or why setting the path name would cause a problem in the first place, but no matter. CMSMS is off and running now.  ;D
nivekiam

Re: [solved] can't log in after clean install 1.2.3

Post by nivekiam »

I've had strange error messages and stuff not work when using Apache and PHP on windows if I didn't change all paths in the php.ini file to reflect a real path on the windows machine.  The path /tmp/session does not exist in Windows.  I'm sure if you changed it to c:\temp\session and made sure Apache could write to that directory the error would have also gone away.
Locked

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