Database error after OS upgrade

Started by fergtm, July 15, 2018, 01:37:29 PM

Previous topic - Next topic

fergtm

Today I updated my server from Ubuntu 14.04 to 16.04 and now SMF 2.0.15 is not working.

After the upgrade I changed $db_type to ´mysqli´ in Settings.php

I can browse the index, subforms and posts but sometimes I get a database error. Also I cannot login, every time I try I get a database error.

How can I see what is wrong?. There is nothing in the apache error.log.

Aleksi "Lex" Kilpinen

What is the error you are getting exactly?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

fergtm

I'm don't know the exact text of the error message since I installed a Spanish language mod  but it translates to "database error: please try again. If you see this error again notify an administrator"

fergtm

I connected to the database from the command line and there is this message in the smf_log_errors:

Incorrect string value: '''' for function inet_aton

shawnb61

I believe you need to disable ipv6 support for 2.0.x smf.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp


fergtm

Thanks, it is was caused by IPv6, I connected with my cellphone (no IPv6) and it worked.

However IPv6 was definitely working before. (Sort off, ip appears empty in the logs).

I´ll try installing the IPv6 mod

Illori

SMF 2.0 does not support ipv6 without that mod.

fergtm

The mod installed successfully but it didn't work. The error I get now is

Incorrect string value: ''2001:470:1f0f:6e:5584:e1b2:d433:f507'' for function inet_aton
File: /srv/http/foro/public_html/foros/Sources/Subs.php
Line: 2720

Illori

you dont need to change that setting to mysqli, you can revert that change.

Quote from: Illori on December 15, 2016, 07:53:32 AM
Quote from: Antes on December 07, 2016, 12:02:37 PM
it is related to IPv6 setup inside the WAMP itself. open your httpd.conf then find this and comment out;
Listen [::0]:80

even if you are not using WAMP that fix should work for you.

fergtm

Quote from: Illori on July 15, 2018, 03:27:06 PM
you dont need to change that setting to mysqli, you can revert that change.

It breaks completely if I don't use mysqli. Ubuntu 16.04 changes PHP version to 7.0 and this version completely removes support for the old mysql functions.

I don't want to remove Listen [::0]:80 from my apache configuration, that will completely disable IPv6.

I finally fixed the problem by disabling the strict MySQL mode (set sql_mode= in my.cnf), that way IPv6 address will be logged as NULL but at least they work.

Illori

if you are running SMF 2.0.15, you dont need to change to mysqli. SMF handles it for you as far as i know.

if you want the ipv6 addresses to be logged, you need to install the mod linked above.

fergtm

Ok. I tried again installing the mod and reverting to 'mysql' instead of 'mysqli'.

It again failed with error Incorrect string value: ''2001:470:1f0f:6e:5584:e1b2:d433:f507'' for function inet_aton

EDIT: It works if I disable MySQL strict mode

Kindred

So disable strict mode. Issue solved
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: