Sentora Support Forums
SQL White Page - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: SQL White Page (/showthread.php?tid=11166)



SQL White Page - klubbers - 04-04-2019

Good afternoon 

I wonder if anybody can help me. I can successfully create sql databases however when I create a user for the databases using the panel I get a blank white page. I can't seem to find what the issue is.


RE: SQL White Page - fearworks - 04-05-2019

(04-04-2019, 10:00 PM)klubbers Wrote: Good afternoon 

I wonder if anybody can help me. I can successfully create sql databases however when I create a user for the databases using the panel I get a blank white page. I can't seem to find what the issue is.

I've seen this issue before. I think I traced it to some updates to functions or something like that. I'll have to have a look at the released Sentora files and compare them to my own working versions to remember what you need to change.

I'll get back to you once I've had a chance to do this. 

Keith


RE: SQL White Page - fearworks - 04-05-2019

(04-04-2019, 10:00 PM)klubbers Wrote: Good afternoon 

I wonder if anybody can help me. I can successfully create sql databases however when I create a user for the databases using the panel I get a blank white page. I can't seem to find what the issue is.

I think this might have been the solution... try it and see!

Edit:


Code:
/etc/sentora/panel/modules/mysql_users/code/controller.ext.php


Find the function:


Code:
static function ExecuteCreateUser($uid, $username, $database, $access)


A couple of lines into the function you should see:


Code:
$currentuser = ctrl_users::GetUserDetail($uid);


Add this on a new line just below:


Code:
$username = $currentuser['username'] . '_' . $username;


Save the file.

Now try creating a user. Also, keep in mind that the maximum MySQL username length in the latest release of Sentora is around 17 characters, and this includes your Sentora username and the underscore. So, if you are using the zadmin account, a database user such as:


Code:
zadmin_user1


should be valid, but:


Code:
zadmin_thisnameistoolongforsentora


will cause an error. The latest github master repository has updated the length to 32 characters, but the version you have installed is most likely the previous release with the shorter limit.

Keith