Page 1 of 1

[solved] Login Problem - Empty Login Page Loop

Posted: Thu Aug 13, 2009 4:46 pm
by shiva-it
Hello,

got the following installation running:
- CMSMS 1.6.3 on
 - Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8
- MySQL 5.0.51a-3ubuntu5.4

Originally the page was set up on CMSMS 1.50. Since then I regularly upgraded up to 1.6.3.

The problem appears since 1.5.4 and is the following:
Once I start up the browser I can login with my username and pw. If I then logout, I can't get into the Backend anymore. When I click Submit on the Login page, the login page gets reloaded, with empty fields.
If I enter a not valid login, wrong username or pw and wrong username and wrong pw, the CMS still shows a "Username or password incorrect" message. If I then restart the browser, it works for 1 login again.
This error I can reproduce on my ubuntu 8.10 laptop with Firefox 3.0.13 and 3.51, InternetExplorer 6 and Opera 9.64. On Vista 64bit with Firefox 3.0.13 and IE 8.

Here's the output of the debug when opening the login site:

Code: Select all

Debug: (1.4E-5) - (647880)

loading smarty

Debug: (0.003972) - (953408)

loading adodb

Debug: (0.005389) - (1047528)

loading page functions

Debug: (0.0084) - (1239924)

loading content functions

Debug: (0.011371) - (1462272)

loading pageinfo functions

Debug: (0.012185) - (1499192)

loading translation functions

Debug: (0.012709) - (1518260)

loading events functions

Debug: (0.01412) - (1609120)

loading php4 entity decode functions

Debug: (0.016288) - (1829644)

done loading files

Debug: (0.026119) - (2610712)

<br>
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs<br>
 Error (0): <br>

Debug: (0.03056) - (2738420)

<br>
(mysql): SELECT * FROM cms_userplugins<br>
 Error (0): <br>

Debug: (0.052268) - (3721312)

<br>
(mysql): SELECT * FROM cms_modules WHERE active = 1 ORDER by module_name<br>
 Error (0): <br>

Debug display of 'End of include':(0.097778) - (7423216)
Debug: (0.098252) - (7408992)

debug is:

Debug: (0.098708) - (7418920)

Debug in the page is: 

When I switch on debug, after Submit-ing it shows:
(I changed the password hash)

Code: Select all

Debug is on. Redirecting disabled... Please click this link to continue.
index.php?sp_=545646b3
Debug: (1.29999999999E-5) - (650356)

loading smarty

Debug: (0.004234) - (955904)

loading adodb

Debug: (0.005674) - (1050024)

loading page functions

Debug: (0.008465) - (1242476)

loading content functions

Debug: (0.011008) - (1464716)

loading pageinfo functions

Debug: (0.011649) - (1501636)

loading translation functions

Debug: (0.012074) - (1520704)

loading events functions

Debug: (0.013335) - (1611528)

loading php4 entity decode functions

Debug: (0.015391) - (1832228)

done loading files

Debug: (0.024887) - (2613868)

<br>
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs<br>
 Error (0): <br>

Debug: (0.028822) - (2741516)

<br>
(mysql): SELECT * FROM cms_userplugins<br>
 Error (0): <br>

Debug: (0.049742) - (3725324)

<br>
(mysql): SELECT * FROM cms_modules WHERE active = 1 ORDER by module_name<br>
 Error (0): <br>

Debug display of 'End of include':(0.094181) - (7427224)
Debug: (0.095997) - (7461208)

<br>
(mysql): SELECT u.user_id FROM cms_users u LEFT JOIN cms_user_groups ug ON u.user_id = ug.user_id WHERE username = 'shiva' AND password = '----------------------------------' AND u.active = 1 AND admin_access = 1<br>
 Error (0): <br>

Debug: (0.096228) - (7462712)

<br>
(mysql): SELECT username, password, active, first_name, last_name, admin_access, email FROM cms_users WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0.096329) - (7463436)

Got user by username

Debug: (0.096368) - (7463532)

User Object
(
    [id] => 1
    [username] => shiva
    [password] => ---------------------
    [firstname] => Admin
    [lastname] => User
    [email] => ----@---.de
    [active] => 1
    [adminaccess] => 1
)

Debug: (0.096413) - (7463968)

Starting login procedure.  Setting userid so that other pages will pick it up and set a cookie.

Debug: (0.096587) - (7464792)

<br>
(mysql): SELECT username, password, active, first_name, last_name, admin_access, email FROM cms_users WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0.096837) - (7465508)

<br>
(mysql): SELECT preference, value FROM cms_userprefs WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0.097312) - (7468900)

<br>
(mysql): INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name, action) VALUES (1250181104,'1','shiva','1','shiva','User Login')<br>
 Error (0): <br>

Debug: (0.098101) - (7495176)

<br>
(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<br>
 Error (0): <br>

Debug: (0.098381) - (7504372)

<br>
(mysql): SELECT version from cms_version<br>
 Error (0): <br>
If I then click on the "link to continue" it's working. I can then always enter and also reenter the Backend.

The following I tried already:
- open_basedir restriction put off
- switched off mod_rewrite
- ran another upgrade
- added

Code: Select all

ini_set('session.use_only_cookies', 1);
to the php.ini
- lookedup the tables in the db, they are really there

Anybody has an idea to this?

Thx,

        Shiva

SOLUTION: in the config.php I had entered an alternative path for the admin directory, so it wouldn't be too easy to find it. Now, when I upgraded this path was offcourse not known to the upgrade.php and so I tried to still login with the files from CMSMS 1.50 instead of 1.6.3. Came to this after reading a little more in the forum here.
BTW Error(0) isn't actually an error :-)