arhost Posted June 23, 2008 Share Posted June 23, 2008 Hi, Please see attached image for more information. Thanks. Link to comment Share on other sites More sharing options...
phenglai Posted June 23, 2008 Share Posted June 23, 2008 I have experienced this also. Did you have a custom PDF template by any chance? Link to comment Share on other sites More sharing options...
arhost Posted June 23, 2008 Author Share Posted June 23, 2008 No, I’m using the default pdfconfig.php file and still getting the same error message. Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 24, 2008 WHMCS CEO Share Posted June 24, 2008 Can you check that the tempnam() PHP function is not disabled on your server. Matt Link to comment Share on other sites More sharing options...
pol1967 Posted June 24, 2008 Share Posted June 24, 2008 I have same issue. Link to comment Share on other sites More sharing options...
phenglai Posted June 24, 2008 Share Posted June 24, 2008 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 More sharing options...
pol1967 Posted June 24, 2008 Share Posted June 24, 2008 Thanks phenglai!!! It works fine now > no PDF error Link to comment Share on other sites More sharing options...
dutchnet Posted June 24, 2008 Share Posted June 24, 2008 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 More sharing options...
phenglai Posted June 24, 2008 Share Posted June 24, 2008 do you have any custom graphics in your pdf or are you using the stock pdf supplied. Link to comment Share on other sites More sharing options...
dutchnet Posted June 24, 2008 Share Posted June 24, 2008 we have our own logo on the invoices not the WHMCS logo, why ? Link to comment Share on other sites More sharing options...
phenglai Posted June 24, 2008 Share Posted June 24, 2008 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 More sharing options...
WHMCS CEO Matt Posted June 24, 2008 WHMCS CEO Share Posted June 24, 2008 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 More sharing options...
Recommended Posts