Invoice generation TCPDF ERROR: [Image] Unable to get image ...

Started by optmax, December 14, 2012, 16:46:11 PM

Previous topic - Next topic

optmax

When generating the invoice during checkout with the 'alatak_creditcard' plugin and also from the back-end orders page, if I have a logo configured in the Payment Method, I get the error:

TCPDF ERROR: [Image] Unable to get image: http://www.practical-magic.com/j25/images/stories/virtuemart/payment/ccard.jpg

The order is still created in the database but no shopper nor vendor emails are sent.

With no payment logo configured there is no problem.

I have run 'Fix file permissions' from Akeeba Admin Tools and checked on the server.  Directory permissions are 755 and file permissions 644.  Following the link given above loads the image.

There are several other threads earlier in the year mentioning this but none of the suggestions work for me.

Thanks in advance for any help with this.

Stephen

VM 2.0.14
Joomla! 2.5.8
PHP 5.3.10

bytelord

Hello,

I am thinking is related to PHP, do you have curl enabled?

Try also on your php.ini file to add:

allow_url_fopen = On;
allow_url_include = On;

After that restart your apache.

also check your permissions under joomla_root_folder/libraries/tcpdf/cache   (the cache folder)

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

optmax

Curl is enabled.

tcpdf/cache has permissions 755
tcpdf/cache has one file index.html with permissions 644

My site is hosted on a shared server and I have no access to the global php.ini, can I set things locally in .htaccess or somewhere else?

Thanks again
Stephen

bytelord

php_value allow_url_fopen On
php_value allow_url_include On

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

optmax

No luck  so far.

I have only recently taken over management of this site and am a relative newcomer to Joomla! / Linux / PHP.

The root instalation is a legacy Joomla! 1.0 site and for some reason has both htaccess.txt and .htaccess files.

My Joomla! 2.5.8  VM 2.0.14 instalation is in a subfolder with a .htaccess file.

Where should I try the php_value commands?
(should they perhaps be php_flag commands - would it make a difference?)

Is there a delay before new config commands like these are enacted?

Regards
Stephen

bytelord

Hello,

Usually your error comes with gif and png images because some libraries from php are missing. VM2 uses tcpdf library to produce PDF invoices as the most PHP projects. I think your issue is related to PHP or Apache libraries but may be not loaded. Please take a look on the installation (post installation about permissions): http://www.tcpdf.org/installation.php

Also check if htaccess authentication is enabled (it should be disabled).

Last please use another image under stories, may be your jpg have something different inside it's format and not support it by tcpdf ... just for testing.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

optmax

I have made no progress   :(

Changing the image has no effect.

Trying the permissions as on the TCPDF post-instalation caused more problems. I has to re-run Akeeba Admin Fix File permissions again.

Is there any way to check that the .htaccess commands are in effect?

As a last resort, how could I remove the images from the pdf invoice but leave them on the payment page?



bytelord

Hello,

I think this is related that some libraries from your PHP/Apache are not loaded by your provider, such as GD ... as GD Support with GIF Read Support, JPEG Support, PNG Support, WBMP
Also tcpdf uses mbstring a lot...

That libraries must be loaded inside php.ini or your apache should compliled with those options enabled, something that only your hosting provider can do it or veryfied...

Please verify that you have that libraries installed and enabled... Those libraries are not requested from vm but from tcpdf library to work: http://sourceforge.net/projects/tcpdf/

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

optmax

Ok thanks for the input.

I will contact my provider and let ou know

Regards

bytelord

Yes please, will be nice to have some more feedback on that.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

disco_dancer

I am having this same problem but on the Product Details page. When i click on the PDF icon on the top right, i get this message
CPDF ERROR: [Image] Unable to get image: /usr/local/apache/htdocs/~username/images/stories/virtuemart/product/erty.jpg

Right now i am using my IP address to visit my site(is it related to this)??

Thanks

Romana

I ran into the same problem, and I think, I found another reason: It is the installation of Joomla in a subfolder! When you reach the site with www.mydomain.com/subfolder, TCPDF has generally a big problem. Same so, when you have a redirect in .htaccess of your installation or at the provider. That concerns creating invoices and also creating PDFs of products.

Workaround for this: Installation in the base folder or configuring the webserver to enter directly (DocumentRoot at apache). In your case it is the path /usr/local/apache/htdocs/~username.

At products I encountered a further problem even at an installation in base folder: It shows an error message TCPDF ERROR: [Image] Unable to get image: /mnt/web8/b1/72/xxx/htdocs/libraries/tcpdf//components/com_virtuemart/assets/images/availability/..., where xxx is replaced for data protection reasons. Why does TCPDF searches in .../libraries/tcpdf//? Yes, also the double slash is in the error message.

I guess, there generally goes something wrong in virtuemart feeding TCPDF with the right pathes...