Hello,
On https://www.phpdocx.com/documentation/conversion-plugin/debugging-openoffice you can find the steps to debug it. If the script is unable to connect to OpenOffice, the most common issue is that some program is blocking it, such as a firewall like iptables, or SELinux; we recommend you to check your server logs to find what program is blocking PHP access OpenOffice.
Anyway, since phpdocx 4.5, the recommended conversion plugin to get the best output is the one based on LibreOffice, we strongly recommend using this one.
Regards.