Hello,
As it's working using PHP CLI mode, we recommend you to get the correct HOME path of Apache user:
<?php
echo getenv("HOME");
or set a custom HOME path, for example to /var/www and create the .config folder:
$ mkdir /var/www/.config
<?php
putenv("HOME=/var/www");
And set 777 access to the .config folder and all its subdirectories
$ chmod 777 -r /var/www/.config
And also check your server logs to find any issue when doing the conversion or some PHP or Apache configuration is blocking the conversion.
On https://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice and https://www.phpdocx.com/documentation/conversion-plugin/common-problems-and-possible-errors you can read about common issues when working with the conversion plugin.
Regards.