Author Topic: Invoice generation TCPDF ERROR: [Image] Unable to get image ...  (Read 10357 times)

optmax

  • Jr. Member
  • **
  • Posts: 96
Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« on: December 14, 2012, 16:46:11 pm »
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

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #1 on: December 14, 2012, 18:01:26 pm »
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

  • Jr. Member
  • **
  • Posts: 96
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #2 on: December 14, 2012, 23:29:12 pm »
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

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #3 on: December 14, 2012, 23:34:49 pm »
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

  • Jr. Member
  • **
  • Posts: 96
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #4 on: December 15, 2012, 00:41:12 am »
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

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #5 on: December 16, 2012, 11:41:22 am »
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

  • Jr. Member
  • **
  • Posts: 96
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #6 on: December 18, 2012, 15:47:46 pm »
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

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #7 on: December 18, 2012, 20:29:07 pm »
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

  • Jr. Member
  • **
  • Posts: 96
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #8 on: December 21, 2012, 18:02:28 pm »
Ok thanks for the input.

I will contact my provider and let ou know

Regards

bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #9 on: December 21, 2012, 18:05:05 pm »
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

  • Beginner
  • *
  • Posts: 23
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #10 on: May 22, 2013, 08:45:02 am »
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

  • Beginner
  • *
  • Posts: 14
    • Boldt Webservice - Websites, die verkaufen!
Re: Invoice generation TCPDF ERROR: [Image] Unable to get image ...
« Reply #11 on: November 18, 2013, 19:42:50 pm »
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...