BambooInvoice Forums

PDF error and email invoice error

 
Total Posts: 13

Hi Derek,

Bamboo was working all fine until recently when I am getting errors whilst trying to email invoices to clients and also generate a PDF of an invoice.

As far as I am aware nothing has changed with our host recently.

The following error is created when trying to generate a PDF…

A PHP Error was encountered
Severity: Warning

Message: file_get_contents(/usr/home/bubblema/public_html/invoicing/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png) [function.file-get-contents]: failed to open stream: No such file or directory

Filename: lib/class.pdf.php

Line Number: 4334

Unable to stream pdf: headers already sent
A PHP Error was encountered
Severity: Warning

Message: unlink(/usr/home/bubblema/public_html/invoicing/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png) [function.unlink]: No such file or directory

Filename: include/cpdf_adapter.cls.php

Line Number: 235

Basically the file broken_image.png in the /plugins/dompdf/lib/res/ folder doesnt exist on the server as it keeps getting deleted every time I generate a PDF or email a PDF to a client. If I copy that file into the folder the send email or generate PDF works for one time and then the broken_image.png gets deleted again? So then I add it again and next time i do a send or generate PDF it gets deleted again and so on…

Any ideas? Is there a license key or soemthing that has expired that is causing this? Bamboo has worked fine since around 25/26th December so I was wondering if there is a months trial or something?

Hope to hear back soon,

James

Total Posts: 2324

Could you ask your host if anything changed please. Do you have the image its referencing (/usr/home/bubblema/public_html/invoicing/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png)? Honestly, I’m not sure.

Total Posts: 13

Derek,

Thanks for the quick response.

The image broken_image.png is present in your files it can be found in the plugins/dompdf/lib/res folder

This file seems to play a part in being responsible for the smooth generating and emailing of PDF’s. All works fine when this file (broken_image.png) is present in the folder plugins/dompdf/lib/res

But as i said after doing 1 generate PDF or email client invoice (which obviously performs the generate PDF function in order to attach it to the email) the broken_image.png somehow then gets deleted from its folder??

Stumped???

It was working fine before…

Total Posts: 13

also if i email invoice to client I get 4 php errors, see below. Again relating to the same broken_image.png but also others:

A PHP Error was encountered
Severity: Warning

Message: file_get_contents(/usr/home/bubblema/public_html/invoicing/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png) [function.file-get-contents]: failed to open stream: No such file or directory

Filename: lib/class.pdf.php

Line Number: 4334

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /usr/home/bubblema/public_html/invoicing/bamboo_system_files/libraries/Exceptions.php:164)

Filename: libraries/Session.php

Line Number: 662

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /usr/home/bubblema/public_html/invoicing/bamboo_system_files/libraries/Exceptions.php:164)

Filename: helpers/url_helper.php

Line Number: 541

A PHP Error was encountered
Severity: Warning

Message: unlink(/usr/home/bubblema/public_html/invoicing/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png) [function.unlink]: No such file or directory

Filename: include/cpdf_adapter.cls.php

Line Number: 235

Total Posts: 2324

Go back to your host. Something odd is happening.

Total Posts: 13

Spoken to host, they say nothing has happened on the server?? No php updates or security updates etc, server is working same as it has since October when the last updates were performed.

Just as stumped…

I will try and do a fresh install in a different directory to pull from the same database and see what the results are…

Unless you have thought of anything since yesterday?

Thanks for your time as always.

James

Total Posts: 2324

I’m sorry, I’ve no idea.

Total Posts: 14

Check your permissions it sounds like the webserver does not have access to the png file…, also can you browse http://example.com/bamboo_system_files/plugins/dompdf/lib/res/broken_image.png and get it to show?


-Chris

Total Posts: 13

Chris,

Thanks for the reply but I’ve figured out the problem now. I have been using an option for cleints to pay via paypal and the reason it had stopped working was that the “check out with paypal” image I was using from Paypal’s website had mysteriously disappeared. I guess Paypal have removed it when they updated old to new buttons…

Anyhow…

But the link you have just posted doesn’t work for me?

Regards,

James.

Total Posts: 14

Glad you got it working clubbers. in the link you where suppose to replace example.com with your location to bi like http://domain.com/invoices/........../broken_image.png.

Also I could save a copy of the paypal image and reference it locally so if they update their images again you will not have an issue…

-Chris

Total Posts: 13

Chris,

Sorry mate i’d not even checked the url to see what was in there… tongue laugh

Yeah I’ve already saved my own copy of the image now and done just that! Thanks for taking the time to look at the problem and offer solutions!

James.