Carlo77PV
Carlo77PV

Reputation: 106

How to fix 'fopen(): remote host file access not supported' error in Chronoforms5?

In a new CentOS 7 server I have a problem with TCPDF plugin of Chronoforms5 component on Joomla 3.9.x CMS that on my old server Debian 8 there isn't. The Joomla installation is the same in both servers.

Old server (working well): Debian 8 / Apache 2.4.10 / PHP 7.1.30 / Joomla 3.9.10;

New server (with error): CentOS 7.6.1810 / Apache 2.4.6 / PHP 7.3.7 / Joomla 3.9.10.

When I submit a form that should create a PDF on a folder like 'cache' (so the url will be http://www.example.com/cache/filexxx.pdf and the path /var/www/html/cache/filexxx.pdf), on Debian it create the file and in debug the $form->files['cf_pdf_file']['link'] value is 'cache/filexxx.pdf' and this is the correct behaviour.

The problem with the same form on CentOS is thet when I submit the form I get this error:

Warning: fopen(): remote host file access not supported, file://cache/tcpdf_20190712104304.pdf in /usr/share/php/tcpdf/include/tcpdf_static.php on line 1821

Warning: fopen(file://cache/tcpdf_20190712104304.pdf): failed to open stream: no suitable wrapper could be found in /usr/share/php/tcpdf/include/tcpdf_static.php on line 1821

TCPDF ERROR: Unable to create output file: cache/pdf/tcpdf_20190712124222.pdf

Upvotes: 0

Views: 1796

Answers (0)

Related Questions