Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » login problem

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 704 Views
  • ronaan
    Avatar
    Community Member
    9 Posts

    login problem Link to this post

    Hello there,

    I have a SilverStripe installation that worked fine for roughly 10 days... then the server rebooted last night and I can't log in any more.
    None of the users, even the default admin, work.

    I get this message (sorry it's German but basically says converting a varchar to a datetime thing fails because the value is out of range)

    I have no idea how to fix this (guess I changed the date/time display format for the users I added).

    I'm not a PHP/SQL pro, so if you have any hint I guess I'll need step by step instructions.

    It would suck having to redo all of the copy-paste work I did in the last 10 days (basically putting content from PDFs into web pages to build our QM system).

    [User Error] Couldn't run query (22007, 242, [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.01000, 3621, [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.): UPDATE "Member" SET "NumVisit" = 7, "RememberLoginToken" = null, "LockedOutUntil" = null, "LastEdited" = '2012-04-13 13:25:04' where "ID" = 1: [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.; [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.
    POST /QM/Security/LoginForm
    Line 620 in C:\inetpub\wwwroot\QM\sapphire\core\model\Database.php

    Source
    611    /**
    612     * Error handler for database errors.
    613     * All database errors will call this function to report the error. It isn't a static function;
    614     * it will be called on the object itself and as such can be overridden in a subclass.
    615     * @todo hook this into a more well-structured error handling system.
    616     * @param string $msg The error message.
    617     * @param int $errorLevel The level of the error to throw.
    618     */
    619    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    620       user_error($msg, $errorLevel);
    621    }
    622    
    623    /**
    624     * Enable supression of database messages.
    625     */
    626    function quiet() {
    Trace
    Couldn't run query (22007, 242, [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.01000, 3621, [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.): UPDATE "Member" SET "NumVisit" = 7, "RememberLoginToken" = null, "LockedOutUntil" = null, "LastEdited" = '2012-04-13 13:25:04' where "ID" = 1: [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.; [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.
    Line 620 of Database.php
    SS_Database->databaseError(Couldn't run query (22007, 242, [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.01000, 3621, [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.): UPDATE "Member" SET "NumVisit" = 7, "RememberLoginToken" = null, "LockedOutUntil" = null, "LastEdited" = '2012-04-13 13:25:04' where "ID" = 1: [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.; [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.,256)
    Line 209 of MSSQLDatabase.php
    MSSQLDatabase->databaseError(Couldn't run query (22007, 242, [Microsoft][SQL Server Native Client 10.0][SQL Server]Bei der Konvertierung eines varchar-Datentyps in einen datetime-Datentyp liegt der Wert auáerhalb des gltigen Bereichs.01000, 3621, [Microsoft][SQL Server Native Client 10.0][SQL Server]Die Anweisung wurde beendet.): UPDATE "Member" SET "NumVisit" = 7, "RememberLoginToken" = null, "LockedOutUntil" = null, "LastEdited" = '2012-04-13 13:25:04' where "ID" = 1,256)
    Line 310 of MSSQLDatabase.php
    MSSQLDatabase->query(UPDATE "Member" SET "NumVisit" = 7, "RememberLoginToken" = null, "LockedOutUntil" = null, "LastEdited" = '2012-04-13 13:25:04' where "ID" = 1)
    Line 568 of Database.php
    SS_Database->manipulate(Array)
    Line 174 of DB.php
    DB::manipulate(Array)
    Line 1048 of DataObject.php
    DataObject->write()
    Line 350 of Member.php
    Member->logIn()
    Line 210 of MemberLoginForm.php
    MemberLoginForm->performLogin(Array)
    Line 125 of MemberLoginForm.php
    MemberLoginForm->dologin(Array,MemberLoginForm,SS_HTTPRequest)
    Line 332 of Form.php
    Form->httpSubmission(SS_HTTPRequest)
    Line 143 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 161 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    Controller->handleRequest(SS_HTTPRequest)
    Line 282 of Director.php
    Director::handleRequest(SS_HTTPRequest,Session)
    Line 125 of Director.php
    Director::direct(Security/LoginForm)
    Line 127 of main.php

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

    Re: login problem Link to this post

    Hi Ronaan,

    Could it be that your server's locale settings have changed as a result of the reboot? I think SQL Server would inherit the servers' locale settings, although I could be wrong.

    Anyway, it looks like SQL Server interpretes the date 2012-04-13 as year-day-month, where it should use year-month-day...

  • ronaan
    Avatar
    Community Member
    9 Posts

    Re: login problem Link to this post

    Hello Martimiz,

    thanks for your reply. Yes, that seems to be the case, it somehow gets the wrong date format.

    Where would I go to change this? SQL Server Management Studio? Changing values in tables got me nowhere (stupid idea I guess... what can I say, I'm not a pro at all...)

    Maybe the reboot had nothing to do with it too... I installed SilverStripe on 04-02 ... worked fine through 04-12 .. like it would, because it works for both date formats... only on 04-13 it thought something was up.

    edit: got it working. I changed the date on the server manually to something that fits into a 12 month logic, to determine that it's really the problem. after that I finally found where in SQL management studio you have to set the language (from where it pulls the date format).

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

    Re: login problem Link to this post

    Glad you have it working now! I'm sorry I didn't get back to you sooner - I forgot to subscribe to the post

    704 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.