[MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

Results 1 to 16 of 16
  1. #1
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Hello RZ,

    I am using UberCMS 2.0.1 with Phoenix Emulator. I have a problem where if a new user sends a f/r to an older user I need to run this SQL query in the DB
    PHP Code:
     UPDATE `usersSET `last_online` = UNIX_TIMESTAMP() 
    Other wise the user who received the friend request will not be able to get back on. I have google searched and tried the fix posted by Subz (I think that is his name) But I have to run the SQL Query stated above or it just messes up again. All help welcome as long as it suits subject. (Meaning no posting saying "You must have done it wrong, tv" or "I user revcms as its better. I dont use ubercms, but good luck")

    PLEASE NOTE TO MOD's Before you delete the thread (If you need too) Message me what is wrong with it and I will fix it. Thank you.


  2. #2
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Strange, but what happens if you just set a default value?
    Code:
    ALTER TABLE `users` CHANGE `last_online` `last_online` INT( 15 ) NOT NULL DEFAULT '0'

  3. #3
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by flx5 View Post
    Strange, but what happens if you just set a default value?
    Code:
    ALTER TABLE `users` CHANGE `last_online` `last_online` INT( 15 ) NOT NULL DEFAULT '0'
    That made it so users couldn't register anymore. Thanks anyways.

  4. #4
    Gaby is offline
    Grand MasterRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Change the last_online column to double and restart your emulator.

  5. #5
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by BaasHotel View Post
    Change the last_online column to double and restart your emulator.
    Oh yeah forgot about that, some emulators make the mistake to enter doubles instead of integers...

  6. #6
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by flx5 View Post
    Oh yeah forgot about that, some emulators make the mistake to enter doubles instead of integers...
    Nope still get the same error
    PHP Code:
    UberCMS has encountered an error 
    Incorrect integer value
    '' for column 'last_online' at row 1 

  7. #7
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    hm, seems like very incorrect code...
    Are you running MySQL within strict mode?
    Because many Devs around here just ignore some standards which leads to errors when running the MySQL Server within strict mode...

  8. #8
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    No I have strict mode turned off.

  9. #9
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Sorry for the late awnser but I've been on vacation...
    Now I'm really confused...
    Can you tell me the line and the SQL Query which produces the error above?

  10. #10
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by flx5 View Post
    Sorry for the late awnser but I've been on vacation...
    Now I'm really confused...
    Can you tell me the line and the SQL Query which produces the error above?
    If I run
    Code:
    ALTER TABLE `users` CHANGE `last_online` `last_online` INT( 15 ) NOT NULL DEFAULT '0'
    Then I get
    PHP Code:
    UberCMS has encountered an error 
    Incorrect integer value
    '' for column 'last_online' at row 1 
    On the register page. I'm not sure on where the code is coming from as I'm still new to the way Uber works.

  11. #11
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Huh, now I've got an idea...
    Open /inc/class.users.php and go to the function Add.
    There you'll have to replace this line:

    PHP Code:
    dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,last_online,account_created) VALUES ('" $username "','" $passwordHash "','" $email "','','" $rank "','" $figure "','" $sex "','','500','1000','','" date('d-M-Y') . "')"); 
    with

    PHP Code:
    dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,last_online,account_created) VALUES ('" $username "','" $passwordHash "','" $email "','','" $rank "','" $figure "','" $sex "','','500','1000',".time().",'" date('d-M-Y') . "')"); 
    EDIT:
    Please do NOT forget to make a BACKUP

  12. #12
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by flx5 View Post
    Huh, now I've got an idea...
    Open /inc/class.users.php and go to the function Add.
    There you'll have to replace this line:

    PHP Code:
    dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,last_online,account_created) VALUES ('" $username "','" $passwordHash "','" $email "','','" $rank "','" $figure "','" $sex "','','500','1000','','" date('d-M-Y') . "')"); 
    with

    PHP Code:
    dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,last_online,account_created) VALUES ('" $username "','" $passwordHash "','" $email "','','" $rank "','" $figure "','" $sex "','','500','1000',".time().",'" date('d-M-Y') . "')"); 
    EDIT:
    Please do NOT forget to make a BACKUP
    Code:
    UberCMS has encountered an error 
    Field 'ip_reg' doesn't have a default value
    Is what I get after changing over the code.

  13. #13
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Those errors really remember me of strict mode...
    Is your original line exactly the same as the one I've posted above?

  14. #14
    R.I.P Millercent FatalLulz is offline
    Grand MasterRank
    Nov 2012 Join Date
    AustraliaLocation
    2,240Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by flx5 View Post
    Those errors really remember me of strict mode...
    Is your original line exactly the same as the one I've posted above?
    Yep. I double checked and made sure MySQL Strict mode is set to off.

  15. #15
    Sorcerer Supreme flx5 is offline
    Member +Rank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    hm, then just change the line to

    PHP Code:
    dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,last_online,account_created,ip_reg) VALUES ('" $username "','" $passwordHash "','" $email "','','" $rank "','" $figure "','" $sex "','','500','1000',".time().",'" date('d-M-Y') . "', '".USER_IP."')"); 

  16. #16
    Elite Member KeineChance is offline
    Member +Rank
    Aug 2012 Join Date
    174Posts

    Re: [MYSQL][PHP][UBERCMS] UberCMS 2 last_online error read for more information.

    Quote Originally Posted by FatalLulz View Post
    Code:
    UberCMS has encountered an error 
    Field 'ip_reg' doesn't have a default value
    Is what I get after changing over the code.
    Ey this is good!
    Make the fix from flx5, and then import my Fix!

    SET@@global.sql_mode ='';

    Now it works!



Advertisement