• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given,

zwankie

Basic Pleskian
Hi everyone,

After an upgrade from Plesk Obsidian 18.0.26 to 18.0.27 there are now errors and issues:

On the Plesk Main Page:
New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Exception: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: TypeError: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Db/Table/Row/PhpSettings.php line: 59 code: 0. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

When running plesk bin php_settings -u
ERR [panel] Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/PHostingManager/Apache.php on line 289:
0: /usr/local/psa/admin/plib/Db/Table/Row/PhpSettings.php:59
Db_Table_Row_PhpSettings->getConfigurationText(integer '0', string 'sub-domain-name-here', array, string '/var/www/vhosts/domain-name-here', string '/tmp')
1: /usr/local/psa/admin/plib/PHostingManager/Apache.php:289
PHostingManager_Apache->{closure}(boolean false, boolean true)
2: /usr/local/psa/admin/plib/PHostingManager/Apache.php:311
PHostingManager_Apache->configurePhpSettings(boolean false)
3: /usr/local/psa/admin/plib/PHostingManager/Apache.php:229
PHostingManager_Apache->transactionalUpdate(object of type Transaction_Rollback)
4: /usr/local/psa/admin/plib/Transaction/Rollback.php:19
Transaction_Rollback->commit(array)
5: /usr/local/psa/admin/plib/PHostingManager/Apache.php:174
PHostingManager_Apache->update()
6: /usr/local/psa/admin/plib/api-common/cuPhpSettings.php:49
cuPhpSettings->_updateAllCommand()
7: /usr/local/psa/admin/plib/api-common/cuApp.php:79
cuApp->_callCommandMethod(array)
8: /usr/local/psa/admin/plib/api-common/cuApp.php:73
cuApp->_executeCommand()
9: /usr/local/psa/admin/plib/api-common/cuApp.php:53
cuApp->runFromCliGate()
10: /usr/local/psa/admin/plib/api-common/CuExecutor.php:69
CuExecutor->execUtil(string 'cuPhpSettings', string 'runFromCliGate')
11: /usr/local/psa/admin/plib/api-common/CuExecutor.php:131
CuExecutor->run()
12: /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:25
CliUtilityRunner->run()
13: /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:34
require_once(string '/usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php')
14: /usr/local/psa/admin/plib/api-cli/php_settings.php:4
ERROR: TypeError: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/PHostingManager/Apache.php on line 289 (PhpSettings.php:59)
exit status 1

I've run plesk repair all and plesk repair web but these issues return the next day.

Any advice?
 
When trying to update the php settings of a domain thisis the error.

Internal errorERROR: TypeError: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/PHostingManager/Apache.php on line 289 (PhpSettings.php:59)<br />
<br><a href='?metaId=7bd033a4d2988be70d41e360c72e0a6c&messageId=de5097a4c8a3571a3ed879947f83df70&file=PhpSettings.php&line=59&type=TypeError&version=18.0.27&message=Argument++passed+to+Db_Table_Row_PhpSettings%3A%3AgetConfigurationText%28%29+must+be+of+the+type+string%2C+array+given%2C+called+in+%2Fpath%2FApache.php+on+line' target='_blank'>Search for related Knowledge Base articles</a>
 
OK, I found a way to resolve this below error.

"Internal errorERROR: TypeError: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/PHostingManager/Apache.php on line 289 (PhpSettings.php:59)<br />
<br><a href='?metaId=7bd033a4d2988be70d41e360c72e0a6c&messageId=de5097a4c8a3571a3ed879947f83df70&file=PhpSettings.php&line=59&type=TypeError&version=18.0.27&message=Argument++passed+to+Db_Table_Row_PhpSettings%3A%3AgetConfigurationText%28%29+must+be+of+the+type+string%2C+array+given%2C+called+in+%2Fpath%2FApache.php+on+line' target='_blank'>Search for related Knowledge Base articles</a>"

It seems to be caused by domains that were migrated from older Plesk versions where there there was a setting under Hosting Settings named Compatibility mode for the legacy option "Separate SSL/TLS and non-SSL/TLS content"

Run "plesk bin php_settings -u" and watch for the domain that shows the error, please keep an eye out for subdomains too.
This command only produces output for 1 domain at a time so you'll need to do the process many times if you have many such old domains.

To solve this, simply un-tick the tick-box for Compatibility mode for the legacy option "Separate SSL/TLS and non-SSL/TLS content" on the domain and update.

Then run "plesk bin php_settings -u" and watch for the next domain which has the issue and repeat until you get a message that says "Per-domain PHP settings of all domains were successfully updated." which means problems solved.

You can also run "plesk repair all -n" to see a list of issues, then either do them manually or run "plesk repair all -y" to auto fix them where possible.

The above will also run "plesk repair web" automatically.

Now still need to solve this one:

"New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Exception: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: TypeError: Argument 3 passed to Db_Table_Row_PhpSettings::getConfigurationText() must be of the type string, array given, called in /usr/local/psa/admin/plib/Template/Variable/Domain/PhysicalHosting.php on line 556 file: /usr/local/psa/admin/plib/Db/Table/Row/PhpSettings.php line: 59 code: 0.

Depending on your exact situation, look at these and see if they help.

Apache config file cannot be generated: Wrong variable to subsitute

Domain reconfiguration fails when custom templates are in use: Class 'Template_Writer_Apache' not found in /opt/psa/admin/conf/templates/custom/server.php

Plesk error: Template processing failed. TemplateException
 
Last edited:
Back
Top