• 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

Issue Plesk protocol: PHP Warning: XMLWriter:

Kulturmensch

Regular Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.48_build1800221104.03
Every full hour this error message appears in my PLESK protocols:

PHP Warning: XMLWriter::text() expects parameter 1 to be string, array given; File: /opt/psa/admin/plib/api-rpc/ExpandXMLLib.php, Line: 203

Any idea what this mean and how to fix it?
 
Yes the following:

[php-fpm-pool-settings]
env[PATH]= /usr/local/bin:/usr/bin:/bin
opcache.enable_cli = 1
opcache.memory_consumption=256
opcache.interned_strings_buffer=32
opcache.max_accelerated_files=10000
opcache.revalidate_freq=2
apc.enabled=1
apc.cli_enable=1
apc.shm_size=256M
 
It is a known issue [PPPM-11540], but it does not have any impact other than that the log entry is written and can be safely ignored.

Workaround: If you do not need the line
Code:
env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
you can remove it and the message will be gone.
 
Thank you Peter, I have removed env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and now I will check over the day whether the messages will disappear. I'll let you know tomorrow what happened:)
 
As you said - now the error messages has gone. Thanks for the hint. But after removing an old openbasedir-Problem came up again that I can not start the "php tool drush" as openbasedir stops it. I tried to configure openbasedir to allow php scripts in the paths /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin but this did not work. So I am now between the devil and the deep blue sea. Now I set openbasedir to none and everything works, no error messages but I feel a little bit unsafe with this solution. If you have any further idea please let me know.
 
If this is about the command line tool Drush, that could be an issue, because you cannot run command line utilitities from a subscription unless the utility is provisioned under the subscription or you grant full access of a subscription account to paths outside of the subscription. Lifting the open_basedir restriction should only be done if you are the only user on your own server. Even then it can be risky in case your scripts have vulnerabilities. You can try to add your software to the command set that is available inside subscriptions, but I am not sure whether Drush itself does not then enables a script to cross subsription boundaries. I have found this articles for you, maybe it is helpful:
 
Hi Peter, yes it is about "drush" which is very comfortable to manage my drupal-site. I just tried to follow you proposal but unfortunately failed.
Result:
...
root@mail:~# ./update-chroot.sh --add /usr/local/bin/ | drush
WARNING: /usr/local/bin/ is not a program (filetype inode/directory; charset=binary), skipping.
ERROR: /usr/local/bin/ was not installed due to the previous errors.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
- Navigate to any where within your Drupal project and try again.
- Add --root=/path/to/drupal so Drush knows where your site is located.
...

The last 3 lines are also the output when I try to run drush in each directory of the subdomain i.e. drush cr or drush updb etc.
 
That command won't work, because it is not the program itself it addresses. The idea behind the chroot update is to get drush "installed" inside your subscription. Unfortunately I don't know Drush well, so I cannot tell you what this requires, but there ought to be a binary and paths for that program that need to become part of the chrooted shell, else it cannot work properly. Maybe also a case for support to assist you with that as you will probably need a support ticket for the licencing issue, too?
 
I also asked the Plesk support for taking care of this issue but they do not support drush. However, I am left with my workaround.
  1. switch openbasedir to none
  2. work with drush
  3. switch openbasedir to default.
In case that something more comfortable comes to my mind I will let you know.
 
Back
Top