Sorry - there were problems logging you on.

Skip to first unread message


Jan 9, 2018, 2:02:04 PM1/9/18
to kPlaylist
This is the message i get when trying to log in the first time after installing kplaylist. What is wrong here? I have trying everything to solve this, but getting nowhere. When i disable logins i sure get in, but this is no option for me. I dont want everybody to get in to my site. Please help :)

Eboneezer Goose

May 2, 2018, 8:18:16 PM5/2/18
to kPlaylist

@Pretender Did you make any progress on this issue?

I had KPlaylist system that's been running fine for many years. Couple of months ago I installed the php7 version in preparation for upgrading my Kubuntu installation. PHP7 version was fine. I even tested it on a backported PHP7 - that was fine too.

Then I upgraded my Kubuntu 14.04 Media server to Kubuntu 16.04. Suddenly Kplaylist stopped working and instead displayed "Sorry - there were problems logging you on." whenever I attempted to log in with the correct credentials. Though it did display the usual "" when attempting wrong credentials. Thus indicating it is communicating with the database. Since then I have installed it on four other Linux boxes running 16.04 and 18.04, and on PHP versions 5.6, 7.0 and 7.2. (Database is MySQL 5.7.22. Apache 2.4). Still no luck. More annoying no other error messages other than the internally generated one. Nothing in the Apache error log. Nothing in the system log.

Now here's the really interesting bit. I found I could log in to the local server (and locally on any of my test machines) if I use "" as the IP address! But not if I used "localhost" or the server's actual IP address "". Which means I cannot log in remotely.

Anyone got any ideas what's happening here?

Eboneezer Goose

May 14, 2018, 2:33:15 PM5/14/18
to kPlaylist
Okay, I spent quite a bit of time on this and I have finally found a fix to the "Sorry - there were problems logging you on." issue. Firstly, it is NOT It is not an authentication issue. Seems it recognises the username and password OK. Seems kplaylist cannot generate a session cookie because it cannot write the session info to the database.

Turns out this is a MySQL database-related issue. New default settings in MySQL 5.7.22, set its the "sql_mode" to:- "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"


Change MySQL 5.7 default settings in /etc/mycnf (or wherever your my.cnf file is) by adding the following, and restart mysql...


By specifying "NO_ENGINE_SUBSTITUTION" it defeats all the other sql_mode restrictions and KPlaylist plays nicely again! Strictly speaking, the login PHP code for KPlayist really could do with some revising so this workaround becomes unnecessary. But for the time being, this workaround seems to resolve the problem.

I hope this helps someone. :-)

Bart van Dijck

Nov 28, 2018, 5:07:08 AM11/28/18
to kPlaylist
This solution worked for me on a Synology, with PHP 7 and MariaDB10.

Thanks Mr. Goose!

I still like using Kplay because it's fast and does what is says. So if anyone could like at an easier solution in the script itself ... Spent a couple of hours on this ...

Matthias Hormann

Apr 6, 2019, 1:08:19 AM4/6/19
to kPlaylist
Thanks for your work! I wonder what the real reason is. Your changes didn’t seem to help much here: I can login from my local network and *could* login remotely until up to Firefox 66.0.1. Now the update to Firefox 66.0.2 came and suddenly I *cannot* login remotely anymore ("Sorry …").

I’m running a slightly older mySQL, though (I think it’s 5.6-something), and I’m running a slightly modified version of dysproseums PHP7-version (

The "Firefox problem" has been verified with some friends, running various Ubuntu/Linux Mint/Windows versions. Also, it seems that it’s not possible logging in using Chromium.

I suspect something wrong with the login code, just before Kplaylist tries to set the cookie, because for some reason the cookie never gets set in the user’s browsers, even though they can log into Kplaylist and work with it just fine, using Firefox version 66.0.1 and below. VERY odd …

Still I think Kplaylist schould be kept alive and fixed somehow because it offers such a lot of great features without much overhead.

Matthias Hormann

Apr 6, 2019, 1:24:20 AM4/6/19
to kPlaylist
N.B.: FYI, I’m running Kplaylist on an older (but regularly updated) Ubuntu 14.04.5 (LTS) server in what Kplaylist calls "UTF8 mode". My PHP version on that machine is still 5.5.9-1ubuntu4.27. My web server is an Apache/2.4.7 (Ubuntu), and php.ini has been modified to allow for up to 500MB file transfers.

Off my head, the changes I made to dysproseum’s version are mainly:
– correcting the language texts (back to UTF-8)
– fix a function check from mysql to mysqli
– add OGG and FLAC to MP3 transcoding for streaming
– add a new Lyrics interface (separate PHP sofotware)
– replace getid3 with the latest (security-fixed) version 1.9-something

So all stuff that worked. Until Firefox 66.0.2. Hmm.

Matthias Hormann

Apr 7, 2019, 2:32:58 PM4/7/19
to kPlaylist
Ok, fixed it. It wasn’t a problem with Firefox 66.0.2 after all but trying to access Kplaylist using IPv6—which wasn’t apparently foreseen when Kplaylist was created.

The problem was that—after entering the login credentials—the INSERT query into TBL_SESSIONS failed and webauthenticate() returned a $status=2.

I had to change the `ip` column in the sessions table from INT(4) to VARBINARY(16) and use PHP’s inet_pton() and inet_ntop() instead of ip2long() and long2ip(). As well as some cosmetic changes like the Users display. Quite an easy fix, after all.

Bart van Dijck

Apr 16, 2019, 10:17:17 AM4/16/19
to kPlaylist
@Matthias Horman: would be great if you could share your changes with Dysproseums githup repo!

Matthias Hormann

May 2, 2019, 5:42:10 AM5/2/19
to kPlaylist
I’m actually planning to share my version (currently at v1.8.713) soon on my own github repo, since I bugfixed about a zillion other things and made several major changes inside, like …
  • inclusion of "getid3" v1.9.17 for improved features & security
  • support for FLAC, OGG and MP3 audio
  • full UTF-8 support (web pages and mySQL using 'utf8mb4')
  • support for PHP Imagick instead of GD
  • FLAC transcoding support
  • FLAC/OGG showing the correct "year"
  • enhanced Icecast/Shoutcast streaming ("radio" feature)
  • IPv6 support
  • PHP 7 compatibility (hopefully)
  • … and more
Unfortunately, this will have to wait a moment (still …), since I’m currently also working on my version of the "ices" streaming client (0.4.5) which is the ideal companion if you’re about to stream (k)playlists to an Icecast or Shoutcast server. My ices adaption currently features
  • better crossfading
  • fixed FLAC/OGG artist/title display
  • compilation against libflac 1.3.0 (instead of the older 1.1.2)
  • ReplayGain support (!)
  • kPlaylist integration using a simple shell script and not requiring a specially patched-up version anymore
This version will also eventually end up in my github repos.

Development is currently Linux-only (Debian/Ubuntu/Mint) since I do not have any Windows machines (and no interest to get one), but should probably work on Windows, too. Well, maybe not ices, I don’t know. My version of kPlaylist will require a reletively modern PHP and mySQL (due to using 'utf8mb4' and compressed tables with large keys).

After making it available, I still hope to find some testers and supporters here.
KPlaylist is much too good to silently vanish in space and time … ;-)
Reply all
Reply to author
0 new messages