Problem with Invalid credentials. - Printable Version
+- Barebones CMS Forums (http://barebonescms.com/forums)
+-- Forum: Regular Forums (/forumdisplay.php?fid=1)
+--- Forum: General Discussion (/forumdisplay.php?fid=2)
+--- Thread: Problem with Invalid credentials. (/showthread.php?tid=8)
Pages: 1 2
Problem with Invalid credentials. - per - 10-03-2010 11:03 AM
Hi, interesting project!
I have a problem that some friendly soul might help me with:
In the end of the installation process I click the Edit-link, but the next page only shows the text "Invalid credentials.".
If I go to the login.php I get the same message whatever credentials i try (that I created during install).
I'm on a test server within my LAN with Ubuntu Server 10.04 so I haven't bothered with moving files as the installer suggested.
I suspect I simply overlook something simple, so I attached the output of ls -l on the install dir.
RE: Problem with Invalid credentials. - thruska - 10-05-2010 07:48 AM
The "Invalid credentials." message happens only when the system can't find the login. The defaults during installation set credential length to 15 days. I see all the necessary files were created for logging in. You should check 'config.php' to see if ROOT_PATH is set correctly. The next step would be to see the exact traffic being sent and received from the server in your browser (either "Live HTTP Headers" or "Firebug" for Firefox). The system thinks it logged you in because you get the 'Edit' link but when you click the 'Edit' link, the server doesn't get the cookie containing the login token. Either the browser either didn't receive the cookie containing your login token or isn't sending it for some reason.
RE: Problem with Invalid credentials. - per - 10-05-2010 12:53 PM
Thanks for your reply!
Time expire: No.
ROOT_PATH: Seems OK.
Traffic: The following are the output in Firebug Net-All-Headers-panel when I get the "Invalid credentials."-message.
Response Headers view source
Date Tue, 05 Oct 2010 19:30:43 GMT
Server Apache/2.2.14 (Ubuntu)
Keep-Alive timeout=15, max=100
Request Headers view source
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:184.108.40.206) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10
Cookie bbl=138d773ed9339cdaef19a861d36b53807802c304; bbq=1; SESS923800a447bf573d5204fbbb500138d2=hic5e3tugmc0d38ugk10st2341; SESS97384c591f0da0eb6cab8996679ab743=o6hrehd3rtkeemam7jn0ijvrj6; SESS14d5d698b430f65e4e00d374b39418ab=voa4sjslmgii5eqcfvuukhobv7
I tested to clear all cookies and sessions stored in Firefox, with same (but less cookies) result.
I also tried to login by IE8 on a Windows machine, but no comfort.
Anything else I can provide?
And yes, I have cleared and reinstalled several times.
This is actually my first request for support in a forum, Google usually provide all answers. I guess this is one drawback of testing something (almost) brand new.
RE: Problem with Invalid credentials. - thruska - 10-05-2010 06:36 PM
Ah. There isn't a "no expire" option. If the '..._TIMEOUT' values in 'config.php' are set to 0, that means 0 seconds. If you don't want them to really expire (not recommended for 'Developer' accounts), set the value to something really large (e.g. 10 years = 10 * 365 * 24 * 60 * 60 = 315360000).
The installer lets people do pretty much anything. It probably shouldn't let them set values smaller than five minutes.
RE: Problem with Invalid credentials. - per - 10-06-2010 11:35 AM
All _TIMEOUT values in config.php was set to 1296000 by the installer.
I attached my config.php (as .txt) for troubleshooting (e-mail credentials replaced).
Thanks for your patience!
I live in Sweden, maybe it's related to my localization?
RE: Problem with Invalid credentials. - ephlodur - 10-07-2010 02:35 PM
Hello I'm having the same problem..
Did you fix your problem if yes how?
Thanks for your help
RE: Problem with Invalid credentials. - thruska - 10-07-2010 06:56 PM
@per - Unfortunately, I see nothing wrong with the config. You've got a lot of patience.
@ephlodur - The problem hasn't been solved yet but I'm working on trying to replicate the problem on my end.
RE: Problem with Invalid credentials. - thruska - 10-07-2010 09:24 PM
I've replicated this problem on my end. And found the problem too. ProcessAllInput() isn't working the same on all versions of PHP.
Clearly says that $_COOKIE is included in $_REQUEST. The first comment on the page though says, "The default php.ini on your system as of in PHP 5.3.0 may exclude cookies from $_REQUEST. The request_order ini directive specifies what goes in the $_REQUEST array; if that does not exist, then the variables_order directive does. Your distribution's php.ini may exclude cookies by default, so beware."
Gah. There are two ways to fix this. The official fix will be to modify ProcessAllInput() to correctly handle this annoying scenario in a future release. In the meantime, changing "request_order" to be "CGP" in your php.ini files should fix the issue. This is only a problem in PHP 5.3.0 and later. The "CGP" order is such as to allow cookies to be overridden by variables in $_GET/$_POST - which is useful for things like allowing Flash uploaders to work by passing cookie values via GET/POST and overwrite any outdated cached cookies Flash might send. Specifically, this is a known, unfixable bug in Flash that affects SWFUpload - one of the reasons ProcessAllInput() exists.
RE: Problem with Invalid credentials. - thruska - 10-07-2010 10:26 PM
If you can't or don't want to edit 'php.ini' to modify the 'request_order' variable and don't want to wait for the next release of Barebones CMS (it'll be a while), get Admin Pack 1.0rc8 - see the Downloads page. Admin Pack contains a modified 'support/str_basics.php' file. Simply overwrite 'support/str_basics.php' in Barebones CMS 1.0 with the one from Admin Pack and Barebones CMS should get past the session validation code.
Let me know if you run into any other issues.
RE: Problem with Invalid credentials. - ephlodur - 10-08-2010 07:15 AM
Thanks for you help changing the php.ini file did not solved the problem for me but the Admin Pack that with the modified version of str_basics.php solved it for me ...
thanks for your prompt response.
(10-07-2010 10:26 PM)thruska Wrote: If you can't or don't want to edit 'php.ini' to modify the 'request_order' variable and don't want to wait for the next release of Barebones CMS (it'll be a while), get Admin Pack 1.0rc8 - see the Downloads page. Admin Pack contains a modified 'support/str_basics.php' file. Simply overwrite 'support/str_basics.php' in Barebones CMS 1.0 with the one from Admin Pack and Barebones CMS should get past the session validation code.