Advertisement:

Author Topic: Step 6 new installation failures  (Read 2812 times)

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Step 6 new installation failures
« on: November 12, 2018, 05:02:05 PM »
Hi Folks,
Didn't see this particular problem posted anywhere on in the FAQ's.
Tried to do a fresh SMF 2.0.15 install on a server.  Install progressed fine until step 6 - setting up the admin account - and got the following error: "Data too long for column 'session_id' at row 1."
I looked at the DB and see the schema was created fine,  The smf_sessions table is empty.  The structure shows the sessio_id field with type and length of CHAR 25> I was thinking it is some issue with the session mechanism in PHP.  Went through the same steps on another server and got the same error at the same place.  Eyeballed PHP.ini and didn't see anything obvious. Can someone give me an idea of where to look next. Apache 2.4.28 PHP 5.5.38
Thanks
Phil Mc

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #1 on: November 12, 2018, 05:03:36 PM »
It's a common issue if you have IPV6 enabled in apache. If you do try to disable that. If not you crease the size of the session_id column in the database to 48 characters.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #2 on: November 12, 2018, 05:28:02 PM »
Thanks for the quick reply.  Started over.  Removed tables and put in a fresh settings.php file. After step 5 finished table creation, I bumped the session_id field length to 48.  Step 6 attempt again. No joy.  Tried 100 then 200.  No joy. Maybe something else obvious I am missing?
phil mc

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #3 on: November 12, 2018, 05:32:52 PM »
Strange. If not disable database sessions on install
If the smf_settings table set databaseSession_enable = 0
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #4 on: November 12, 2018, 05:50:07 PM »
Great.  That was some progress.  Install completed.  Did say the user had previously been created, so I guess that table was written to previously, but not the session table.  OK, so I backed out and logged in to test.  Worked fine except an error displayed:

Data too long for column 'session' at row 1
File: /Library/Server/Web/Data/Sites/Default/forum/Sources/Subs.php
Line: 2692

No data written to session table.

phil mc

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #5 on: November 12, 2018, 05:57:58 PM »
Try in the the smf_settings table set databaseSession_enable = 0
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #6 on: November 12, 2018, 06:18:41 PM »
Hi,
I did make that edit earlier - smf_settings table set databaseSession_enable = 0.  That got me through the install process.  Apparently there is a loose end that still throws an error I mentioned above.   Have been working on killing IPv6 on that server to ultimately get sessions back playing in the database.  One interface is very pesky.
phil mc

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #7 on: November 12, 2018, 06:49:26 PM »
Two more tables to make bigger smf_log_online and smf_log_errors
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #8 on: November 12, 2018, 07:07:00 PM »
session field, IP field?  I did just succeed in killing IPv6 on the 5 interfaces on that box.  I just tried -- smf_settings table set databaseSession_enable = 1  but no joy.  Set back to 0 but SMF is squirrelly.  I can't make a post process. Keep seeing that error message :
Data too long for column 'session' at row 1
File: /Library/Server/Web/Data/Sites/Default/forum/Sources/Subs.php
Line: 2692

I am guessing there is a lot of dependency on that session log entry....

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #9 on: November 12, 2018, 07:20:28 PM »
Maybe reclose the browser and back in again. Yeah the session column in those database tables.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #10 on: November 12, 2018, 07:46:00 PM »
OK, I doubled the session field value in both of those tables from 32 to 64.  Flushed history and caches in the browser and restarted it.
Getting the same error after logging in:
Data too long for column 'session' at row 1
File: /Library/Server/Web/Data/Sites/Default/forum/Sources/Subs.php
Line: 2692

still have smf_settings table set databaseSession_enable = 0

If it's any help, you can look at the test forum here: http://redwood.powersrvcs.net/forum/ [nofollow]

All the network interfaces on that server have IPv6 disabled....



Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #11 on: November 12, 2018, 08:17:33 PM »
Hmm i would sources/subs.php
Find
Code: [Select]
$smcFunc['db_insert']($do_delete ? 'ignore' : 'replace',
'{db_prefix}log_online',
array('session' => 'string', 'id_member' => 'int', 'id_spider' => 'int', 'log_time' => 'int', 'ip' => 'raw', 'url' => 'string'),
array($session_id, $user_info['id'], empty($_SESSION['id_robot']) ? 0 : $_SESSION['id_robot'], time(), 'IFNULL(INET_ATON(\'' . $user_info['ip'] . '\'), 0)', $serialized),
array('session')
);

Add before
Code: [Select]
echo $session_id;

I just want to see how big it is.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #12 on: November 12, 2018, 10:21:06 PM »
I found that code section at line 2687 in sources/subs.php, but didn't find a [select] statement.  Your code tweak is not clear to me.  I'm not a PHP coder. If you can do an "as found" and "as left" example, I can give it a try.

I'm troubled that a fresh SMF install has failed on two different servers. One of the servers has been running other PHP apps for a while.

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #13 on: November 12, 2018, 10:35:45 PM »
OK, I made a try at it.  Don't see that data displayed??

if ($do_delete || !empty($user_info['id']))
         $smcFunc['db_query']('', '
            DELETE FROM {db_prefix}log_online
            WHERE ' . ($do_delete ? 'log_time < {int:log_time}' : '') . ($do_delete && !empty($user_info['id']) ? ' OR ' : '') . (empty($user_info['id']) ? '' : 'id_member = {int:current_member}'),
            array(
               'current_member' => $user_info['id'],
               'log_time' => time() - $modSettings['lastActive'] * 60,
            )
         );
      echo $session_id;
      
      $smcFunc['db_insert']($do_delete ? 'ignore' : 'replace',
         '{db_prefix}log_online',
         array('session' => 'string', 'id_member' => 'int', 'id_spider' => 'int', 'log_time' => 'int', 'ip' => 'raw', 'url' => 'string'),
         array($session_id, $user_info['id'], empty($_SESSION['id_robot']) ? 0 : $_SESSION['id_robot'], time(), 'IFNULL(INET_ATON(\'' . $user_info['ip'] . '\'), 0)', $serialized),
         array('session')

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #14 on: November 12, 2018, 10:37:55 PM »
Yeah that is strange. I know SMF has trouble with IPV6 SMF 2.0.x in SMF 2.1 that will be fixed.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #15 on: November 13, 2018, 07:24:50 AM »
Well, in total I have made three separate efforts to get 2.0.15 working two separate newer servers.  Migrated a running forum, then two fresh installs. Epic fail.  I'm open to other suggestions.
In the meantime, I'll try an install of the beta version.

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #16 on: November 14, 2018, 06:04:10 PM »
So I installed 2.1 beta 3.  Installation looked OK and progressed to the end.  Used the link at the bottom of the completion page to see the forum - then tried to logout.  Got this error

Session verification failed. Please try logging out and back in again, and then try again.
so a good catch-22 :)

so it looks like there are still issues with session variables.  I checked the session table and see the session_id value is now VARCHAR with length of 128.  There is a record in the session table - this is the session string:
141cjnvjif11olhrhpcgnemq1eanhfvhsnrls1aundcog0ss861gdpbf0ke5ickj6e4mrb3su8c5qafloil3kk1g24vp6atgr3sdc90

looks like a length of 103

looks like the same type and length for session_id in the other two log tables mentioned previously. 
I suppose I should post this over in the beta forum and see if anyone will chime in?


Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,622
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Step 6 new installation failures
« Reply #17 on: November 14, 2018, 06:11:31 PM »
For 2.1 I would suggest grabbing the latest version from github at this point https://github.com/SimpleMachines/SMF2.1
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Session verification failed after fresh install of Beta 3
« Reply #18 on: November 14, 2018, 06:28:17 PM »
Doing a fresh install of SMF 2.1 beta 3 since I was having problems with 2.0.15 fresh installs on two different servers.  It looked like session related problems with 2.0.15.  Think I am seeing the same thing with beta 3.

Installation of 2.1 beta 3 progressed through the end fine.  Used the link at the bottom of the completion page to view the new forum.  Went to logout and got this error:

Session verification failed. Please try logging out and back in again, and then try again.

a good catch-22 :)

I see 2.1 beta 3 has the session_id field as VARCHAR with a length of 128.  I checked the value of the single record is the sessions table.  The session_id string counted at 103 characters long.

Anyone have a clue what the problem is?


Offline philmc_webgeek

  • Semi-Newbie
  • *
  • Posts: 15
Re: Step 6 new installation failures
« Reply #19 on: November 14, 2018, 06:36:14 PM »
Thank you.  Took a look.  Not sure of how to get all the current pieces vs just what I have for Beta 3.  I did post my problem description on the 2.1 support board.