Jump to content

[RESOLVED] PDF error - v3.6.2


Recommended Posts

If you have this line at the bottom of the page in your pdfconfig.php

 

$pdf->SetFooterData($CONFIG["Domain"]." - ".$_LANG["page"]." {pg} / {nb}");

 

make it

 

#$pdf->SetFooterData($CONFIG["Domain"]." - ".$_LANG["page"]." {pg} / {nb}");

 

and save and you should be good on your PDF

Link to comment
Share on other sites

I get the same error so there must be something else causing the same problem cause I do not have the remarked line in pdfconfig.php

 

I will test if the tempnam() function is included and will post the results.

In 3.6.1 we did not have any problems with the generation of pdf files.

 

====================

I ran the following test file without any problems so tempnam() cannot be the cause of my pdf problems?

 

<?php

$filename = tempnam('/tmp', 'zlibtest') . '.gz';
echo "<html>\n<head></head>\n<body>\n<pre>\n";
$s = "Only a test, test, test, test, test, test, test, test!\n";

// open file for writing with maximum compression
$zp = gzopen($filename, "w9");

// write string to file
gzwrite($zp, $s);

// close file
gzclose($zp);

// open file for reading
$zp = gzopen($filename, "r");

// read 3 char
echo gzread($zp, 3);

// output until end of the file and close it.
gzpassthru($zp);
gzclose($zp);

echo "\n";

// open file and print content (the 2nd time).
if (readgzfile($filename) != strlen($s)) {
       echo "Error with zlib functions!";
}
unlink($filename);
echo "</pre>\n</body>\n</html>\n";

?>

Link to comment
Share on other sites

Did you replace the whmcs file or add your own?

 

If you added your own, check out in the pdfconfig.php page for the logo. We had our own logo but we had to change the path. You should see $pdf->Image(dirname(__FILE__).

 

The new template reads $pdf->Image(ROOTDIR.

 

We had to change the path to ROOTDIR.'/images/outlogo.jpg'

 

Give that a shot and see if that solves your issue.

 

Jerel

Link to comment
Share on other sites

  • WHMCS CEO

That change of default image path won't make any difference. Some things to check are that Safe Mode is disabled, the logo image is a valid JPEG file and that the tmpfile() php function is not disabled.

 

If none of that helps, open a ticket for furthur assistance.

 

Matt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated