ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

TCPDF ERROR: Can't open image file: http://xyz.com/images/i270.png

Ronn 21 Mar, 2020
I have a form that generates a PDF that is saved in a folder. After I upgraded to php 7.3 I get an error " TCPDF ERROR: Can't open image file: http://xyz.com/images/i270.png".
I am not able to figure out what could be the mistake.
I have a lot of php coding in my form and it confuses me to use v6 so I am sticking on to V5 which I find more durable.
Please help

Thanks

Ron
healyhatman 22 Mar, 2020
And do you HAVE such an image at that url on your site? Can you access it in a browser?
Ronn 23 Mar, 2020
Hello,

Yes.. It works fine upto php 7.0. but after that I get this error.
Ronn 25 Mar, 2020
Hello
I have this code that picks up the image from a dynamic file. Works fine till php 7. after that i get an error as above.
<?php echo "\n         {$image[$form->data['photo']]}"; ?>
And if I uncomment it the entire form works fine like this:
<?php // echo "\n         {$image[$form->data['photo']]}"; ?>

Thanks

Ron
GreyHead 25 Mar, 2020
Hi Ronn,

PHP 7 has limited the ways in which arrays can be defined - please try defining $image as an array before you use it here.

Bob
Ronn 25 Mar, 2020
Hey Bob

Thanks for the reply.. I am not able to get it work..
<?php  
$unit = $image[$form->data['photo']];

echo $unit

?>

Could you suggest an example please..

Thanks again

Ron
GreyHead 26 Mar, 2020
Hi Ron,

Where do you define $image - it's not part of the normal form data?

Bob
Ronn 26 Mar, 2020
Hello Bob

It is from my array
<?php. $image = array(	); ?>

Random pick

Ronn
GreyHead 27 Mar, 2020
Hi Ronn,

But that isn't in the code snippet in your earlier post?? I'm not sure what you are trying to do here?

Bob
Ronn 27 Mar, 2020
Bob.

The. earlier snippet is the code I use to pick data from my array (the second snippet). You asked me where the $image came from .. I have been using this code till php 7.0 but after 7.0 if I choose 7.1 or 7.2 or 7.3 php this does not work.

Hope I have been able to rightly mention.

Thanks

Ron
GreyHead 28 Mar, 2020
Hi Ron,

I'm sorry but I don't see how this works - have you only posted a part of your PHP code here?

Bob
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com