forgot password?


   
1 of 2
1
Logo missing in PDF
Posted: 04 February 2008 10:40 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi all,
I’m having a problem with getting my business logo to appear in the generated pdf’s
when I send the email invoice command I get the following errors and the pdf that is sent does not have the logo.

A PHP Error was encountered

Severity: Warning

Message: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/img/logo/logo.jpg) is not within the allowed path(s): (/var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs:/tmp)

Filename: include/image_cache.cls.php

Line Number: 131
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs/bamboo_system_files/libraries/Exceptions.php:164)

Filename: libraries/Session.php

Line Number: 295
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs/bamboo_system_files/libraries/Exceptions.php:164)

Filename: helpers/url_helper.php

Line Number: 455

Any help with this problem would be appreciated

Lindsay McKay
Data Oz Solutions
http://www.dataozsolutions.com.au

Profile
 
 
Posted: 13 February 2008 10:51 PM   [ Ignore ]   [ # 1 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

does the file /var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs/img/logo/logo.jpg exist?
I imagine because I can surf http://billing.dataozsolutions.com.au/img/logo/logo.jpg

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 13 February 2008 11:18 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Marc,
Yep the file exists, and if I replace the little red cross image that is used when there is an error with the logo file then it appears on the pdf output but you still get all the errors. So the problem appears to be in an url or in the code. But I’m not familiar with the functions being used in this pdf creation.

Thanks

Lindsay McKay

Profile
 
 
Posted: 14 February 2008 10:07 AM   [ Ignore ]   [ # 3 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

ok, we can eliminate the last 2 errors (Cannot modify header information) since they are cause by the fact output has started because of the 1st error.

So in fact, we have only 1 error.

Could you do this for me: check the file permissions on the image. Sometimes, I have trouble with files that have other permissions then 755. Often when files are 644, the apache server has trouble dealing with them.

Awaiting.

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 14 February 2008 08:11 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Marc,
No joy there I’m afraid.
The logo was charmod 644, I changed it to 755 and confirmed that all the nested dirs were 755, but still it gave me the same errors.

Thanks

Lindsay McKay

Profile
 
 
Posted: 14 February 2008 09:52 PM   [ Ignore ]   [ # 5 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

ok Lyndsay.

I’ll look into this.

Marc

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 14 February 2008 10:14 PM   [ Ignore ]   [ # 6 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

ok, Here is one debug step farther:
add

die($resolved_url);

on line 130 and make a pdf out of a bill… this will give you the exact place it’s looking for your image on your server.
according to what I read in your post, it should be EXACTLY the folowwing:
/var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs/BAMBOOPATH-WHATEVERITIS/img/logo/logo.jpg
can you confirm?
if you confirm, you said having changed permissions to this file to 755, but can you also confirm the user and group are ok? you seem to have plesk as a hosting service… the user should be the same as your plesk login and the group should be psacln… if not change the user/group assignment to the file.
Don’t forget to remove the above line…
Awaiting news.

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 14 February 2008 10:16 PM   [ Ignore ]   [ # 7 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

sorry… line 130 of /whateveryourBAMBOOroot/bamboo_system_files/plugins/dompdf/include//image_cache.cls.php

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 15 February 2008 02:04 AM   [ Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Marc,
I have given your instructions a try a the information that was returned was just “/img/logo/logo.jpg”, minus the quotes of course.
So this doesn’t seem quite like what you ave suggested it should be.
There must be some code a little out of whack.
I am not quite sure where in plesk to check the user and group settings here so I am waiting for a response from one of the server techs.

Cheers
Lindsay McKay

Profile
 
 
Posted: 15 February 2008 02:12 AM   [ Ignore ]   [ # 9 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

ok then…

I am not home so am going at this from memory…

at line 130… remove the die command and put:

$resolved_url "/var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs" $resolved_url

It’ll transform

/img/logo/logo.jpg

into

/var/www/vhosts/dataozsolutions.com.au/subdomains/billing/httpdocs/img/logo/logo.jpg


This should work.

Going to bed now. 1:12 am here…

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 15 February 2008 02:48 AM   [ Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Marc,
Thanks for your help.
It was very successful, I had to add a semicolon to the end of the line.
Sorry to have kept you up with this problem.
I will look closer at why this is a problem and see if there is not a more elegant solution than hard coding the url in at that point. As well as modifying the invoice design to fit the regulations here in Australia.

Cheers
Lindsay McKay

Profile
 
 
Posted: 15 February 2008 09:31 AM   [ Ignore ]   [ # 11 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

Dear Lindsay.
It was a pleasure.
To solve the problem permanently, you may need to replace that /var thing at the beginning with your url address variable found in bambooinvoice’s config.php file. Then, should you change host/domain, it wouldn’t be harcoded.
Have a nice day.
Marc
P.S.: what is there to be modified to fit Australia’s requirements?

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 16 February 2008 05:44 PM   [ Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Marc,
In order to fit federal regs etc, it needs to say “Tax Invoice” and have our Australian Business Number on it and other such little things.

Once again, thank you very much for your help

Cheers

Lindsay McKay

Profile
 
 
Posted: 16 February 2008 05:48 PM   [ Ignore ]   [ # 13 ]  
Jr. Member
RankRank
Total Posts:  36
Joined  2007-09-16

Thanks for the info.
It’s been a pleasure Lindsay.
Take care and happy bamboo’ing
Regards.

 Signature 

Marc Arbour
Senior coder at Ci².ca
My users community Ci³.ca

Profile
 
 
Posted: 20 February 2008 03:03 AM   [ Ignore ]   [ # 14 ]  
Newbie
Rank
Total Posts:  4
Joined  2008-02-20

Hi same problem for me . pdf is created without logo.
my base config setting:
$config[’base_url’] = “http://www.flatearthweb.com/few/bambooinvoice/”;

Ive added line 130 :
$resolved_url = “/home/content/h/b/a/hbarilefeh/html/few/bambooinvoice/” . $resolved_url;

however when I regenerate pdf and go to open pdf it says “ a drawing error occured “ and the document opens with the invoice number and date , however the rest is completely blank ?

If I remove the line pdf creates as normal without logo and invoice details, however I was trying to follow above thread and Im probably doing something wrong ?  this will be perfect for my business if I can get working .

Profile
 
 
Posted: 20 February 2008 03:52 AM   [ Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  13
Joined  2008-01-28

Hi Hayden,
What was the exact error that was comeing up before you started altering the code.
It might be helpful to replace the files with original files and copy the exact error messages here.
I am not certain of the correctness of the url’s you are useing.

Cheers
Lindsay McKay

Profile
 
 
   
1 of 2
1