BambooInvoice Forums

Email and PDF do not work?

 
Total Posts: 4

Hi all,
Just downloaded and installed a fresh install, set everything up with no hassles at all.

Entered my first invoice and went to email it to the client then BANG!

When I click the “Generate PDF” or “Email Invoice” buttons I get the following error:
/***************************/
A PHP Error was encountered

Severity: Warning

Message: domdocument::domdocument() expects at least 1 parameter, 0 given

Filename: include/dompdf.cls.php

Line Number: 167

Strict Standards: date() [function.date]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Australia/Melbourne’ for ‘11.0/DST’ instead in C:\xampp\htdocs\bambooinvoice\bamboo_system_files\libraries\Log.php on line 89

Strict Standards: date() [function.date]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Australia/Melbourne’ for ‘11.0/DST’ instead in C:\xampp\htdocs\bambooinvoice\bamboo_system_files\libraries\Log.php on line 102

Fatal error: Call to undefined method domdocument::loadHTML() in C:\xampp\htdocs\bambooinvoice\bamboo_system_files\plugins\dompdf\include\dompdf.cls.php on line 286
/***************************/

Any help would be greatly appreciated.

Total Posts: 2324

It looks like this isn’t a professionally hosted environment. Sorry, I basically don’t know anything about server administration on Windows. Do you have access to a professionally hosted site?

Total Posts: 4
Derek Allard - Feb 12, 2010 05:54am

It looks like this isn’t a professionally hosted environment. Sorry, I basically don’t know anything about server administration on Windows. Do you have access to a professionally hosted site?

Hi Derek,

Nice work by the way!

To answer your question, I do. However, I have XAMPP for Windows running on my laptop, and I don’t really need/want it hosted externally, as I’m just a solo contractor.

XAMPP, is just Apache/MySQL/PHP bundled together. It seems to be sh$ting itself with the PDF generation part (i think)? Does the “Email invoice” feature start generating a PDF or does it email a HTML/Text version of the invoice?

Thanks.

Total Posts: 2324

Hm, interesting, I’ve found the error that would make it happen - odd that you’d get it, but I think we can fix it up.

Open up index.php. At the very top of it you’ll see

<?php
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|--------------------------------------------------------------- 

Below “<?php” and above “/*” put

date_default_timezone_set('America/Toronto'); 

So that your new first few lines look like this

<?php
date_default_timezone_set
('America/Toronto');
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|--------------------------------------------------------------- 

You can change “America/Toronto” to whatever best describes your location based on the options here.

Let me know if that fixes it up for you. I’m still not sure why you’re the only person whose ever had (or at least reported) this, but I think that should fix it up.

Total Posts: 4
Derek Allard - Feb 12, 2010 03:33pm

You can change “America/Toronto” to whatever best describes your location based on the options here.

Let me know if that fixes it up for you. I’m still not sure why you’re the only person whose ever had (or at least reported) this, but I think that should fix it up.

Hi Derek,

I tried that, and it did tidy up the date errors, but the fatal error is this one

theampersand - Feb 12, 2010 03:33pm

Fatal error: Call to undefined method domdocument::loadHTML() in C:\xampp\htdocs\bambooinvoice\bamboo_system_files\plugins\dompdf\include\dompdf.cls.php on line 286

Still not working :(

I noticed you said on the site that the demo isn’t working because you were updating the code base. Is the new code ready for downloading? Hoping this may fix what-ever is wrong?

Total Posts: 2324

The new code will only fix this particular error if I replace the PDF generating routine. I’d like to do so, but time (as always) works against me here. If you are technically minded, you could try updating the PDF code on your own - you’ll find it at http://code.google.com/p/dompdf/

Total Posts: 4
Derek Allard - Feb 15, 2010 03:59pm

The new code will only fix this particular error if I replace the PDF generating routine. I’d like to do so, but time (as always) works against me here. If you are technically minded, you could try updating the PDF code on your own - you’ll find it at http://code.google.com/p/dompdf/

Thanks Derek, I’ll take a look.