• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

[PPPM-3299] Users unable to create new database "Undefined variable: dbType"

Bernard T

New Pleskian
Hi everyone,

since last few microupdates we were notified that users can't create a new database.

Here is the error that pops up when user tries to create database.

- - - - - -
Internal error.

PHP Notice: Undefined variable: dbType
Line: 119
File: /usr/local/psa/admin/plib/Smb/Form/Final/Database.php
Stack Trace:
#0 Smb_Exception_Syntax::handleError(8, Undefined variable: dbType, /usr/local/psa/admin/plib/Smb/Form/Final/Database.php, 119, Array ([data] => Array ([general] => Array ([name] => bertoplak_test,[dbType] => mysql,[dbServersList] => {"mysql":{"1":"Local MySQL server (default for MySQL)"},"postgresql":{"2":"Local PostgreSQL server (default for PostgreSQL)"}},[dbDefaultServersList] => {"mysql":1,"postgresql":2}),[user] => Array ([createUser] => 1,[name] => test,[forgery_protection_token] => 0fff53d053025417011c22e15eb00f62,[password] => Yov2g7!7,[passwordConfirmation] => Yov2g7!7),[user-password-generate-button] => ,[user-password-show-button] => ,[hidden] => ,[forgery_protection_token] => 0fff53d053025417011c22e15eb00f62),[userNameElement] => Smb_Form_Element_Text Object ([helper] => formText,[] => 1,[] => 1,[] => ,[] => Array ([Element] => Array ([decorator] => Element,[options] => ),[ViewScript] => Array ([decorator] => ViewScript,[options] => Array ([viewScript] => partials/database-user-name-element.phtml,[serverControl] => CommonPanel_Form_Element_SimpleText Object ([helper] => formSimpleText,[] => 1,[] => 1,[] => ,[] => Array ([SimpleText] => Array ([decorator] => SimpleText,[options] => )),[] => ,[] => ,[] => Array (),[] => Array (),[] => ; ,[] => Array (),[] => ,[] => ,[] => ,[] => ,[] => Database server,[] => Array ([DECORATOR] => Zend_Loader_PluginLoader Object ([] => Array (),[] => Array (),[] => Array ([Zend_Form_Decorator_] => Array ([0] => Zend/Form/Decorator/),[CommonPanel_Form_Decorator_] => Array ([0] => CommonPanel/Form/Decorator/),[Smb_Form_Decorator_] => Array ([0] => Smb/Form/Decorator/)),[] => )),[] => Array (),[] => dbServer,[] => ,[] => ,[] => ,[] => ,[] => ,[] => Array (),[] => Array (),[] => Local MySQL server (default for MySQL),[] => ,[] => ,[data-value] => 1)))),[] => ,[] => ,[] => Array (),[] => Array (),[] => ; ,[] => Array (),[] => ,[] => ,[] => ,[] => ,[] => Database user name,[] => Array ([DECORATOR] => Zend_Loader_PluginLoader Object ([] => Array (),[] => Array (),[] => Array ([Zend_Form_Decorator_] => Array ([0] => Zend/Form/Decorator/),[CommonPanel_Form_Decorator_] => Array ([0] => CommonPanel/Form/Decorator/),[Smb_Form_Decorator_] => Array ([0] => Smb/Form/Decorator/)),[] => ),[VALIDATE] => Zend_Loader_PluginLoader Object ([] => Array (),[] => Array (),[] => Array ([Zend_Validate_] => Array ([0] => Zend/Validate/),[CommonPanel_Validate_] => Array ([0] => CommonPanel/Validate/),[Smb_Validate_] => Array ([0] => Smb/Validate/)),[] => )),[] => Array (),[] => name,[] => ,[] => 1,[] => ,[] => ,[] => ,[] => Array (),[] => Array (),[] => ,[] => ,[] => ,[prefix] => ,[autocomplete] => off,[class] => input-text))) called at [/usr/local/psa/admin/plib/Smb/Form/Final/Database.php:119]
#1 Smb_Form_Final_Database->isValid(Array ([general] => Array ([name] => bertoplak_test,[dbType] => mysql,[dbServersList] => {"mysql":{"1":"Local MySQL server (default for MySQL)"},"postgresql":{"2":"Local PostgreSQL server (default for PostgreSQL)"}},[dbDefaultServersList] => {"mysql":1,"postgresql":2}),[user] => Array ([createUser] => 1,[name] => test,[forgery_protection_token] => 0fff53d053025417011c22e15eb00f62,[password] => Yov2g7!7,[passwordConfirmation] => Yov2g7!7),[user-password-generate-button] => ,[user-password-show-button] => ,[hidden] => ,[forgery_protection_token] => 0fff53d053025417011c22e15eb00f62)) called at [/usr/local/psa/admin/application/smb/controllers/DatabaseController.php:185]
#2 Smb_DatabaseController->createAction() called at [/usr/local/psa/admin/externals/Zend/Controller/Action.php:516]
#3 Zend_Controller_Action->dispatch(createAction) called at [/usr/local/psa/admin/externals/Zend/Controller/Dispatcher/Standard.php:295]
#4 Zend_Controller_Dispatcher_Standard->dispatch(Zend_Controller_Request_Http Object ([] => Array ([0] => _GET,[1] => _POST),[] => /smb/database/create,[] => ,[] => ,[] => /smb/database/create,[] => Array ([module] => smb,[controller] => database,[action] => create),[] => ,[] => Array (),[] => 1,[] => smb,[] => module,[] => database,[] => controller,[] => create,[] => action), Zend_Controller_Response_Http Object ([] => Array (),[] => Array (),[] => Array (),[] => Array (),[] => 200,[] => ,[] => ,[headersSentThrowsException] => 1)) called at [/usr/local/psa/admin/externals/Zend/Controller/Front.php:954]
#5 Zend_Controller_Front->dispatch() called at [/usr/local/psa/admin/plib/Application/Web.php:38]
#6 Plesk\Application_Web->run() called at [/usr/local/psa/admin/htdocs/application.php:15]
- - - - - -
 
Hi @Bernard T!

We confirm that it's bug in Plesk 12.0.18. The ID of the bug in our internal tracker is PPPM-3299. I hope it'll be fixed in nearest microupdates.

I think there is workaround as a temporary solution: add permission "Select database servers" in subscription or service plan (it's located in right column of permissions).
 
Hi all!

@vlikhtanskiy: was this issue fixed finally?
We are still experiencing the problem without the workaround.

Since we have added additional MySQL server to the list, we wouldn't like to let any user change their DB server, and this bug forces us to do so.
 
Last edited:
Also you can disable display_errors and reporting of notices in /usr/local/psa/admin/conf/php.ini and the problem won't annoy you. It's recommended configuration.
 
Unfortunately that won't solve the problem, only hide the fact that there is an error. The databases don't get created unless the subscription has option for changing db servers enabled.
 
The issue is reproduced as you describe only if display_errors = On in php.ini file or some extension modifies display_errors.
 
Back
Top