Page 1 of 2

FPDF error: Missing or incorrect image file

Posted: 12 Sep 2019, 13:40
by karthikjoe
Hi Team

When i click generate reports from Job Orders i got this error instead of generating reports.
Code: Select all
Warning: getimagesize(http://ats.ambconline.com/index.php?m=graphs&a=jobOrderReportGraph&data=7%2C4%2C3%2C0): failed to open stream: HTTP request failed! HTTP/1.1 502 Connection refused in D:\xampp\htdocs\OpenCATS\lib\fpdf\fpdf.php on line 1500
FPDF error: Missing or incorrect image file: http://ats.ambconline.com/index.php?m=graphs&a=jobOrderReportGraph&data=7%2C4%2C3%2C0
Environment Deatils.
OS : Windows Server 2012 R2
OpenCATS : 9.4 Full
Platform : XAMPP
Apache : 2.4
PHP Version : 5.6.20
Database Version : MySQL 10.1.13-MariaDB

Re: FPDF error: Missing or incorrect image file

Posted: 19 Sep 2019, 11:05
by RussH
Hi Karthikjoe,

sorry for the delays.. Firstly, can you reproduce this error on the demo site at demo.opencats.org or not? If you can, please check if you have allow_url_fopen enabled in your php.ini.

Re: FPDF error: Missing or incorrect image file

Posted: 19 Sep 2019, 13:52
by karthikjoe
RussH wrote: 19 Sep 2019, 11:05 Hi Karthikjoe,

sorry for the delays.. Firstly, can you reproduce this error on the demo site at demo.opencats.org or not? If you can, please check if you have allow_url_fopen enabled in your php.ini.
Hi RussH

Thanks for your response. In Demo site that report was generated successfully but in my server it won't works.
Yes i have enabled
Code: Select all
allow_url_fopen enabled
in my php.ini but it doesn't work RussH.

Re: FPDF error: Missing or incorrect image file

Posted: 20 Sep 2019, 14:14
by RussH
you restarted apache, too? (Sorry - have to cover all the bases)

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 09:34
by karthikjoe
RussH wrote: 20 Sep 2019, 14:14 you restarted apache, too? (Sorry - have to cover all the bases)
Yes Russh and server also.

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 11:22
by RussH
Can you check your .htaccess setup please - as per https://github.com/opencats/OpenCATS/issues/31

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 11:48
by karthikjoe
RussH wrote: 26 Sep 2019, 11:22 Can you check your .htaccess setup please - as per https://github.com/opencats/OpenCATS/issues/31
In that folder there is no .htaccess files and root folder also.

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 12:59
by RussH
Hey @karlang89 I think you have some local error, as if I visit your reported URL
(http://ats.ambconline.com/index.php?m=g ... C4%2C3%2C0)

then I can see the graph!

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 13:33
by karthikjoe
RussH wrote: 26 Sep 2019, 12:59 Hey @karlang89 I think you have some local error, as if I visit your reported URL
(http://ats.ambconline.com/index.php?m=g ... C4%2C3%2C0)

then I can see the graph!
Yes @RussH i'm also seeing graph in my ATS server but OpenCATS can not convert it into pdf format that's only error of this server like below.
https://demo.opencats.org/index.php?m=r ... t&ext=.pdf

Re: FPDF error: Missing or incorrect image file

Posted: 26 Sep 2019, 14:42
by RussH
sorry I think this may possibly be a XAMPP / Windows issue as D:\xampp\htdocs\OpenCATS\lib\fpdf\fpdf.php is trying to open a URL. Does this need to be permitted in a firewall someplace? The error is Connection refused - so it's successfully attempting to make the connection and is being rejected.

I don't know how XAMPP handles scripts trying to reach the internet, but I suspect you will have a windows log someplace showing this is being blocked.