hello

i have a problem with tcpdf. i don't get this thing running. when i want to generate a pdf from a node, there appears a server error message.
in the logfile the following errormessage is visible:

FastCGI: comm with server "/home/ftp_prs/php-fastcgi/php5-fcgi.fcgi" aborted: error parsing headers: duplicate header 'Content-Type'

Does anyone has / had the same problem as me?

thanx for the help!

Comments

jcnventura’s picture

Status: Active » Closed (works as designed)

FastCGI is right, there is indeed a duplicate Content-Type header.. See #451304: Drupal outputs two meta content-type tags for an explanation on why it's happening, and why there's nothing I can do about it.. Sorry.

I would like to state that it's a bit stupid on FastCGI's part to abort based on that harmless error.

João

jcnventura’s picture

Also this problem seems to be known to FastCGI developers and maybe fixed in their CVS version (http://www.fastcgi.com/archives/fastcgi-developers/2008-September/000048...).

It's a shame they have chosen not to create a new version in almost 2 years.. I would look around for something similar that has a more active release cycle.

I think this should solve your problem: http://www.fastcgi.com/dist/mod_fastcgi-SNAP-0811090952.tar.gz

daniela basualdo’s picture

thanks a lot for your support!
So, for my understandig. I have to unzip the package of the last link you added to the fastcgi folder? hope this is possible cause i'm not hosting the server and need to pass this to the provider.

hope it's gonna work afterwards.. i already spent hours to find out how to fix ;)

cheers
skylar

Damien Tournoud’s picture

Status: Closed (works as designed) » Active

This has nothing to do with #451304: Drupal outputs two meta content-type tags. The "duplicate" headers in the error message is not the HTML <meta http-equiv="Content-Type"> one, but a true HTTP header. I suppose that both Drupal and TCPDF try to do:

header('Content-Type: xxxx/xxxx');

... probably with conflicting MIME types.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

@skylar78: have you been using the print module with TCPDF prior to version 6.x-1.7?

Can you try a simple fix? Look for drupal_final_markup() in the print_pdf/print_pdf.pages.inc file and simply delete that line.. If PDF generation is now able to continue, that can help us understand where the problem is.

I don't believe your host provider will be compiling and installing mod_fastcgi from that file. If the above suggestion works, that's the fix that you'll have to do to solve the problem.

João

daniela basualdo’s picture

hi joão
no i'm using the version 6.x-1.7.
i took out drupal_final_markup() but the error is still appearing.
haven't heard anything from the provider.i also ton't think so that he will install the patch, but let's wait for it.

daniela

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Hi,

I took a look at this.. This is a duplicate header that's being created by Drupal and TCPDF.
Drupal sets Content-type to text/html and TCPDF sets it to application/pdf. Unfortunately Drupal sets it at such an early stage that I can't cancel it..

Simply said, I doubt you'll be able to do PDF generation until FastCGI is fixed in your host.

João

tassoman’s picture

I've «simply» solved that issue opening PDF in browser's new window :\