- 14 May 2008, 17:54
#172
Seems like I'm getting an old error that was supposedly fixed in version 0.7 (I'm using 0.8.0 and have gotten the same error in 0.9.1). The error I'm getting is the same one found in this bug report: http://www.catsone.com/bugs/?do=details&task_id=63
Basically I am trying to generate a report from a Job Order. This fails because fpdf can't open the image "file" which is a URL to generate a JPG image. I believe the problem is related to permissions. We have an LDAP that people have to authenticate against to view CATS. Since ReportsUI.php calls fpdf.php with the URL I believe the credentials are not passed in correctly. This causes the following error:
FPDF error: Missing or incorrect image file: http:// . . . cats/index.php?m=graphs&a=jobOrderReportGraph&data=0%2C0%2C0%2C0
If I cut and paste this URL into a browser it works just fine, probably because the browser is authenticated.
Basically I am trying to generate a report from a Job Order. This fails because fpdf can't open the image "file" which is a URL to generate a JPG image. I believe the problem is related to permissions. We have an LDAP that people have to authenticate against to view CATS. Since ReportsUI.php calls fpdf.php with the URL I believe the credentials are not passed in correctly. This causes the following error:
FPDF error: Missing or incorrect image file: http:// . . . cats/index.php?m=graphs&a=jobOrderReportGraph&data=0%2C0%2C0%2C0
If I cut and paste this URL into a browser it works just fine, probably because the browser is authenticated.
Code: Select all
The old bug report says this was fixed. Does anybody know how it was fixed, whether it should still be fixed and if there is an easy work-around? The FIXME tags refer to passing a cookie, yet this doesn't seem to be the case anymore? Any ideas why and/or what happened? It sure would be nice to have a source code repository we could search through to get easy answers (not that I expect that from this particular project). /* Note that the server is not logged in when getting this file from
* itself.
*/
// FIXME: Pass session cookie in URL? Use cURL and send a cookie? I
// really don't like this... There has to be a way.
// FIXME: "could not make seekable" - http://demo.catsone.net/index.php?m=graphs&a=jobOrderReportGraph&data=%2C%2C%2C
// in /usr/local/www/catsone.net/data/lib/fpdf/fpdf.php on line 1500
$URI = CATSUtility::getAbsoluteURI(
CATSUtility::getIndexName()
. '?m=graphs&a=jobOrderReportGraph&data='
. urlencode(implode(',', $dataSet))
);
$pdf->Image($URI, 70, 95, 80, 80, 'jpg');