Buy Now
Sign in

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

Ronn , March 21 2020, 15:33
Ronn 300
March 21 2020, 15:33 #391713
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
I don't know if there is heaven..But yes.. I believe in Angels....
healyhatman 9
March 22 2020, 03:51 #391715
And do you HAVE such an image at that url on your site? Can you access it in a browser?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Ronn 300
March 23 2020, 15:06 #391723
Hello,
Yes.. It works fine upto php 7.0. but after that I get this error.
I don't know if there is heaven..But yes.. I believe in Angels....
Ronn 300
March 25 2020, 10:41 #391748
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
I don't know if there is heaven..But yes.. I believe in Angels....
GreyHead 64
March 25 2020, 11:48 #391751
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Ronn 300
March 25 2020, 11:58 #391752
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
I don't know if there is heaven..But yes.. I believe in Angels....
GreyHead 64
March 26 2020, 09:15 #391773
Hi Ron,
Where do you define $image - it's not part of the normal form data?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Ronn 300
March 26 2020, 10:18 #391776
Hello Bob
It is from my array
<?php. $image = array(  ); ?>
Random pick
Ronn
I don't know if there is heaven..But yes.. I believe in Angels....
GreyHead 64
March 27 2020, 09:50 #391790
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Ronn 300
March 27 2020, 10:27 #391792
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
I don't know if there is heaven..But yes.. I believe in Angels....
GreyHead 64
March 28 2020, 10:13 #391799
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much