MariaDB problem on a MYSQLi implementation?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

MariaDB problem on a MYSQLi implementation?

Post by p4eab » Thu Jun 15, 2017 5:48 pm

Hello everyone, I wonder if someone can help me please.

I have a phpBB 3.2 forum using a MYSQLi database back end on a hosted environment. It has been working fine until yesterday when this error started to be displayed when trying to access the forum.

Can anyone help me please?

General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 [1064]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21724
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: MariaDB problem on a MYSQLi implementation?

Post by Mick » Thu Jun 15, 2017 6:47 pm

Good evening,
p4eab wrote:
Thu Jun 15, 2017 5:48 pm
It has been working fine until yesterday when this error started to be displayed when trying to access the forum
Generally, if your board was working as expected and you've done nothing to cause the error such as editing code, installing extensions and styles then your host must have changed something, you should ask them what they've done to cause the problem. You could also check the server error logs. If you don't get anywhere with that please fill out the Support Request Template and post it back here to enable us to assist you better.
"The more connected we get the more alone we become" - Kyle Broflovski

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Thu Jul 13, 2017 7:15 pm

Support Request Template
What version of phpBB are you using? phpBB 3.2.0
What is your board's URL? http://www.roverp4dg.org.uk/phpBB3/
Who do you host your board with? TalkTalk Business
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What version of phpBB3 did you update from? phpBB 3.0.1
What styles do you currently have installed? No answer given
What language(s) is your board currently using? No answer given
Which database type/version are you using? MS SQL Server
What is your level of experience? New to PHP and phpBB technical issues
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? The board just stopped working with the error message below having been working OK since the update. TalkTalk Business has confirmed that no updates have been applied to the server.
Please describe your problem. On accessing the board this appears:

SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 [1064]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Generated by SRT Generator

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21724
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: MariaDB problem on a MYSQLi implementation?

Post by Mick » Thu Jul 13, 2017 7:42 pm

This looks like an impasse to me. If you can get copies of the server error logs they may point to the problem.
"The more connected we get the more alone we become" - Kyle Broflovski

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Wed Aug 16, 2017 5:49 pm

My hosting service has provided this information when connecting to the database on which the Forum is hosted:

mysql -h sql5c25m.carrierzone.com -u uroverp_238050_1 -D roverp4dgorguk_238050_db1 -A -p Trying to connect... Connected successfully with credentials supplied! Database Selected Successfully! Listing Tables in roverp4dgorguk_238050_db1

I assume this demonstrates that the implementation is not a MariaDB implementation and therefore I wonder what error condition is identified by phpBB to produce the error message (what is happening at line 3?):

General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 [1064]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.


I'd appreciate any help or advice please as the Forum has been down for a while.

Many thanks.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21724
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: MariaDB problem on a MYSQLi implementation?

Post by Mick » Wed Aug 16, 2017 6:40 pm

But the issue for me would be "I've done nothing so what's changed to cause the problem?"
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: MariaDB problem on a MYSQLi implementation?

Post by canonknipser » Wed Aug 16, 2017 6:44 pm

p4eab wrote:
Thu Jun 15, 2017 5:48 pm
MYSQLi
is no database system, it is the driver used by php to access MySql-Databases - the i stands for improved

MariaDB is a free "fork" of the MySql-DB, created when MySql was taken over be Oracle -> https://en.wikipedia.org/wiki/MariaDB
and is compatible with the mysql-command-syntax

This message is given by the database server, so
p4eab wrote:
Wed Aug 16, 2017 5:49 pm
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 [1064]
clearly tells you that your DB-Server is running MariaDB


As said above, the following conclusion is wrong
p4eab wrote:
Wed Aug 16, 2017 5:49 pm

I assume this demonstrates that the implementation is not a MariaDB implementation and therefore I wonder what error condition is identified by phpBB to produce the error message (what is happening at line 3?):
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Wed Aug 16, 2017 8:21 pm

Mick wrote:
Wed Aug 16, 2017 6:40 pm
But the issue for me would be "I've done nothing so what's changed to cause the problem?"
TalkTalk claim that they have not made any changes. Perhaps the background to what has caused the error message could give me evidence to say to TalkTalk that "phpBB software is detecting this condition so what have you changed to cause it".

Any ideas about the coding at that point of the forum software please?

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3391
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: MariaDB problem on a MYSQLi implementation?

Post by thecoalman » Wed Aug 16, 2017 9:24 pm

As already mentioned the best place to start is the error logs. It may shed some more light on what is occurring and where. DB error log is often separate, if you do not have access to the DB error log ask for it.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21724
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: MariaDB problem on a MYSQLi implementation?

Post by Mick » Thu Aug 17, 2017 8:55 am

Are you saying you're hosted with TalkTalk, I didn't realise they were hosting I thought they were just an ISP?
"The more connected we get the more alone we become" - Kyle Broflovski

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Thu Aug 17, 2017 5:06 pm

We are using a legacy hosting arrangement with them which is outsourced to another company. This I think is part of the problem. I am a couple of steps away from the service provider.

This is why I would benefit from knowing what conditions have been detected by the phpBB software that give rise to the error message. That would give me the detail to go back to Talk Talk Business.

Can anyone establish what phpBB software is detecting please?

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: MariaDB problem on a MYSQLi implementation?

Post by canonknipser » Thu Aug 17, 2017 5:32 pm

If you enable the debug mode (remove the comment signs // on the debug line in config.php) you should get more informations, esp. the complete command.

But a first guess: check your database password (also in config.php) for any special signs like <>'$%"&\/ or similar - if you have something like that, change password to a string with only letters (Upper- and lowercase, numbers) and dashes -. you must change it for the database user ini database administration and in config.php for phpBB
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Thu Aug 17, 2017 6:10 pm

Having invoked Debug I get this:

General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 [1064]

SQL

SELECT * FROM phpbb3_styles s WHERE s.style_id =

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/user.php
LINE: 264
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/index.php
LINE: 29
CALL: phpbb\user->setup()

User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: MariaDB problem on a MYSQLi implementation?

Post by canonknipser » Thu Aug 17, 2017 7:27 pm

The sql-command is incomplete:
p4eab wrote:
Thu Aug 17, 2017 6:10 pm
SELECT * FROM phpbb3_styles s WHERE s.style_id =
Looks like something happend with the styles configuration in the database.

Check your config-data for default_style and override_user_style and, if you are logged in, for your personal (in the users table) value of user_style and the same value for the guest user.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

p4eab
Registered User
Posts: 12
Joined: Thu Jun 15, 2017 5:43 pm

Re: MariaDB problem on a MYSQLi implementation?

Post by p4eab » Thu Aug 17, 2017 9:58 pm

Thanks for the feedback. Is there a way to recover the styles information. I cannot understand how the Forum was working fine and then it wasn't. Could the styles information problem be a result of the hosting service doing something to the hosted database or server environment?

Post Reply

Return to “[3.2.x] Support Forum”