Reputation: 670
I have an OpenCart e-commerce system setup. I tried to use TCPDF module for generating PDF Invoices of my existing orders.
Module Name: TCPDF URL: https://sourceforge.net/projects/tcpdf/ Version: 5.9.202 Release date: 2012-12-16 Author: Nicola Asuni
This Modules seems to work fine on my Local (Dev Environment) but it does not function on my Production environment (which is similar in configs).
Error:
Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2 TCPDF ERROR: [Image] Unable to get image: chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/call_skype_logo.png
I tried troubleshooting but I am not able to find what is causing it. Can anyone please advice?
Upvotes: 0
Views: 442
Reputation: 4309
Firstly, you're using a really old version of TCPDF
. You should use the latest version from https://github.com/tecnickcom/TCPDF.
Secondly, it looks like you're asking TCPDF
to include an image using a URL but you are providing a URL that would probably only work locally on a browser. The wrapper that the error is talking about is related to streams. See http://php.net/manual/en/intro.stream.php Basically, "chrome-extension" is not a valid stream. Examples of valid types of streams can be found here: http://php.net/manual/en/wrappers.php I'm surprised this URL worked locally, but I guess it's because you have Chrome installed locally so your operating system is being nice and allowing PHP to access the file referred to by that URL.
To resolve your issue on the server you will need to grab a copy of the file that you want to include in the PDF file, put it somewhere on the server in a directory that the web server user can access and provide that file name to TCPDF.
Upvotes: 0