RoundCube ERROR: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,114
This is a brand new fresh install and I set up one test email user. Email works fine. When I go into RoundCube for the first time I get the error:

DATABASE ERROR!​

Unable to connect to the database!
Please contact your server-administrator.

when I
./build update
./build roundcube
it finishes with:
Roundcube 1.5.0 has been installed successfully.
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
ERROR: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
ERROR: Failed to connect to database
Reloading php-fpm56.
 
This is a brand new fresh install and I set up one test email user. Email works fine. When I go into RoundCube for the first time I get the error:

ERROR: Failed to connect to database
Reloading php-fpm56.
While php-fpm56. i guess is on the forum here somewhere to change default php version ( if i am ricght out of my head)

Which OS and version while default from setup initial install from DA this old version is nogood, only if you install older OS and versions mayby so if this is still default DA have to change, if you yourself set this then ok... ;)

Also maybe more is (to) old mysql / mariadb for example!

other versions but error like: https://www.roundcubeforum.net/index.php?topic=24856.0
 
Last edited:
From Directadmin Docs: 1. Empty Database
# mysql -uda_admin -p<MySQL password from install>
mysql>
mysql> show databases;
mysql> use da_roundcube;
mysql> show tables;
mysql> SELECT * FROM users;
Empty set (0.06 sec)
mysql> SELECT * FROM contacts;
Empty set (0.03 sec);
mysql> DROP DATABASE da_roundcube;
Query OK, 16 rows affected (0.24 sec)
mysql> quit

# cd /usr/local/directadmin/custombuild
# ./build roundcube
...
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
ERROR: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
ERROR: Failed to connect to database
Reloading php-fpm56.

I started going backwards according in the SQL updates in the next stop but ran into an issue instantly. It said syntax error. When I look inside of 2020122900.sql, the latest one, it shows only:
--empty
When I check the file out at https://github.com/roundcube/roundc...25b77c512f520c2569e/SQL/oracle/2020122900.sql it shows that is what is supposed to be in that file.
If I go one back to 2020091000.sql, it throws the error:
ERROR 1050 (42S01) at line 1: Table 'collected_addresses' already exists
So I know that the roundcube database must be up to date.

If I try to log into PHPMyAdmin I get the error message:

dot.gif
Wrong username/password. Access denied.​

It's not the wrong username or password. It's the same ones I used to log in from the command line.
 
Last edited:
While php-fpm56. i guess is on the forum here somewhere to change default php version ( if i am ricght out of my head)

Which OS and version while default from setup initial install from DA this old version is nogood, only if you install older OS and versions mayby so if this is still default DA have to change, if you yourself set this then ok... ;)

Also maybe more is (to) old mysql / mariadb for example!

other versions but error like: https://www.roundcubeforum.net/index.php?topic=24856.0
I will research your suggestions.
 
I will try to track this down. Since I'm virtual, I can step back through my install to determine if the install was good at any point along the way and determine what causes the problem. The only downgrading I've done is spinning up this Linux server instead of FreeBSD. LOL! If worse comes to worse I can upgrade to one of our FreeBSD installs.
 
I rolled all the way back to the DA install and it didn't work then either so I rolled back to where I was. I'm guessing the problem is a character type mismatch between MySQL and the apps.
 
Also take care todo no downgrades mysql, mariadb and switch between mysql mariadb back and forward while that is going to be a problem, even if it seems solved you can have big problems later.
- One thing we know for sure and that is you can't trust DA's setup script to deliver something that works.
- I set the da_roundcube database and all of its tables back to UTF-8 to see if that makes a difference. It doesn't so I rolled back to before the change.
- Since I had previously rolled back to "After DirectAdmin Install" and it wasn't working right out of the gate, I'm thinking about rolling back to "After DirectAdmin Pre-installation Software" and start another fork to see if DA can even do an auto install that works.
- If that works, I saved off my directadmin.conf and options.conf and see if it will install using the options file.
- While this issue is not completely unique to DirectAdmin, they do need to combine components into a working product and that is not happening.
 
While php-fpm56. i guess is on the forum here somewhere to change default php version ( if i am ricght out of my head)

Which OS and version while default from setup initial install from DA this old version is nogood, only if you install older OS and versions mayby so if this is still default DA have to change, if you yourself set this then ok... ;)

Also maybe more is (to) old mysql / mariadb for example!

other versions but error like: https://www.roundcubeforum.net/index.php?topic=24856.0
There are a lot of combinations that don't work with the setup.sh. I have a work-around for them, but you were correct in that I'm not going anywhere if I install PHP 5.6
 
Which you shouldn't do anyway
I'd rather not of course, but this is to port a huge and old PHP system across that still even has MySQL The idea was getting it running on a new server with 5.6 and then turn on 8.0 and see what breaks. I have two options:
1. It is currently running on FreeBSD 11.2 server and I could extend the volume to make room for it. That one is running 5.6 and 7.2 and the older MySQL.
2. Bring it to the new server, let it break six-ways-to-Sunday, update my old debugger from a long time ago, PHPEd, and work through the issues. I will probably start here and let the guy who develops it at the marketing and interface level hunt down the issues once it is somewhat alive since he knows all of the nooks and crannies and a lot better spotting things that aren't right. I'm not even sure of REGEX in it is correct since PHP moved away from POSIX back in 5.3.

There are more plenty more areas you can shoot yourself in the foot than PHP 5.6. I've written a simple script to keeps the installs on the straight and narrrow that leverages the automation in in setup.sh at a high level that prevents running ito these issues. setup.sh is has to manage a huge table that requires someone who can do that. That is one thing I am good at. I had to do that when I wrote Finite Scheduling for an ERP package. I'm very good at writing business applications like ERP, barcode scanning, interfacing with machinery, accounting, SPC data automation and graphic, EDI with banks and car makers, and designing and making the electronics to do what I need to do. When it comes to knowing bash, I couldn't hold a candle to whoever maintains setup.sh, which I suspect is SmTalk. I can do anything with web languages, but not efficient nor good at turning out elegant code. Those things are not what excite me these days and that's what it takes to do it well.
 
Isn't there an option to upgrade to a newer php version and mysql before going over to the new server? Maybe that would make it more easier to go over to DA? So upgrade the PHP on FreeBSD or isn't that an option for some reason? I'm not familiar with BSD so I don't know.

I know there are some people still running php 5.6 without Cloudlinux on DA servers, but if I'm not mistaken that might take some customisation to get it to work.
 
Isn't there an option to upgrade to a newer PHP version and MySQL before going over to the new server? Maybe that would make it more easier to go over to DA? So upgrade the PHP on FreeBSD or isn't that an option for some reason? I'm not familiar with BSD so I don't know.

I know there are some people still running PHP 5.6 without Cloudlinux on DA servers, but if I'm not mistaken that might take some customization to get it to work.
I could do option 1 above in house. The FreeBSD 11.2 is all set up for that and has no problem running any version. All I need to do is either extend the /home partition or move a disk hog that is on there elsewhere. I was going to use this as an opportunity to port the site and test it under Linux at the same time as all. I'll with the first option if necessary.
 
Please don't quote complete posts. People know what they wrote, and it makes things less clear. :)

I'll with the first option if necessary.
I was just thinking of that since DA can have odd issues with php 5.6 so best options then are upgrading before transfer or using Cloudlinux.
But since FreeBSD is that stable, I thought it may be best to start doing it there so the transfer can be a smoothly as possible.
 
You mean you can't follow my logic? Which part?
I'm not native English but I thought I was clear.

DA is sometimes having odd issues with php 5.6 as this is EOL. If php 5.6 works fine in FreeBSD and 7.2 is on there too, might be best to first upgrade everything to php 7.x before transferring accounts to DA (with Linux, because that's what I thought you wanted to do).
So seems logic to me to start doing the upgrades in FreeBSD because it's more stable with php 5.6 if I understand you correctly, instead of porting to DA with a Linux distro and then start upgrading php from 5.6 to new.

Which part of this logic is unclear to you? Maybe I can try to explain better, or I might have misunderstood what you were trying to accomplish.
 
You mean you can't follow my logic? Which part?
I'm not native English but I thought I was clear.
That means I agree with you, and can not find anything wrong with your logic.

The reason I threw Linux into the mix is because DirectAdmin is moving away from FreeBSD. If I cannot live with Linux, than I cannot live with DirectAdmin on a busy money-maker. That was the reasoning behind my logic for the topic, "I'm curious if anyone has ever tried using a GUI on their web server?". A GUI is a far more efficient way to maintain a server than the console. Currently, DirectAdmin is its GUI.

However, we also have other sites where Linux I know would be fine. However, you would still want a control panel to manage anything with virtual hosts. DirectAdmin is the perfect GUI to do that.

IMO DirectAdmin is smart having low-cost personal licenses for DirectAdmin to get it into people's hands to generate buzz. cPanel is nothing but buzz and they've made a lot of money on buzz. With DirectAdmin, you might have issues during install, but once installed it is rock solid and fast. With cPanel, after installation your issues have just begun. The most noteworthy aspect of cPanel's interface is its ability to develop user patience. It runs as though they have sleep clauses incorporated into every action. I breaks more often than Windows 3.0. A lot of kids buy little VMs at linode, DigitalOcean, etc. For $24/year they can have a DirectAdmin license that will do 10 domains, which is about what they need. In a couple years, these kids will have real jobs. They aren't going to put up with cPanel once they've worked with DirectAdmin. That would be like trying to talk someone into trading their car for a "hay burner" (horse), and make more expensive payments on the "hay burner". Until you've driven a car, a "hay burner" is amazing. JBMC Software with their personal edition of DirectAdmin is running these kids through driver's training.
 
Last edited:
That means I agree with you, and can not find anything wrong with your logic.
Ah sorry, I wasn't familiar with that term, didn't see it before.

I understand your thoughts about DA and Linux. Indeed you have to be able to live with a supported Linux distro.
Now I also better understand your question about the GUI. DA is a GUI but thought you were talking about a real GUI like Windows, so talking in Linux that would mean Gnome or KDE for example. I thought you wanted to run DA under KDE or something, so I misunderstood that one.

CP was very nice in the beginning. A bit more expensive, but that was compensated by the support you got and the ease of work, you almost never had to dive in to SSH for example. Problem with CP is they were taken over by Oakley and then te big price raising started who scared a lot of people away. Logically.
I never had issues with cPanel, still administering a server with it, almost never have to look at it. But I don't run VM's with it.

The $24 dollar a year personal license of DA, which they introduced on the licensing policy change, they hit the bullseye. For people wanting to learn, but very much also for hobbyists and people like developpers, website designers and other designers.
It's very nice that as professional panel company, they created this offer.
JBMC Software with their personal edition of DirectAdmin is running these kids through driver's training.
Exactly.
 
I know there are some people still running php 5.6 without Cloudlinux on DA servers, but if I'm not mistaken that might take some customisation to get it to work.
 
I know there are some people still running php 5.6 without Cloudlinux on DA servers, but if I'm not mistaken that might take some customisation to get it to work.
Thanks! I can expand the /home of a FreeBSD Server 11.2 server, which is probably what I should have done in the first place. For Linux, I decided to just go with PHP 8.0, toss it in there, and debug from there since DirectAdmin is moving away from FreeBSD.

I thought I would use the opportunity to learn Linux and figured that the install would go better with it because it is DirectAdmin's reference platform. However, this AlmaLinux install makes FreeBSD troubles during install look trivial. I spend most of my time debugging their documentation and I'm becoming an expert with the Linux find / -name command.
 
Last edited:
Back
Top