FPDF works locally but not online

I have a FPDF output which works perfectly locally but there is problem online.

The error is:

Fatal error: Uncaught exception ‘Exception’ with message ‘FPDF error: Some data has already been output, can’t send PDF file (output started at /home/wa/public_html/razpis/baza.inc.php:1)’ in /home/wa/public_html/razpis/fpdf.php:271
Stack trace:
#0 /home/wa/public_html/razpis/fpdf.php(1052): FPDF->Error(‘Some data has a…’)
#1 /home/wa/public_html/razpis/fpdf.php(1012): FPDF->_checkoutput()
#2 /home/wa/public_html/razpis/naredipdf.php(169): FPDF->Output(‘razpis.pdf’, ‘D’)
#3 /home/wa/public_html/razpis/razpis5.php(136): require(’/home/wa…’)
#4 /home/wa/public_html/razpis/index.php(165): include_once(’/home/wa…’)
#5 {main} thrown in /home/wa/public_html/razpis/fpdf.php on line 271

The error message indicates you have output on line 1 of - baza.inc.php

You would need to find what that output is and eliminate it… Some common possibilities -

  1. The file has been saved as a UTF-8 encoded file, with the BOM (Byte Order Mark) characters. If so, save the file without the BOM characters.

  2. You have some characters in the file before the <?php opening tag.

  3. You have some php code on line 1 in the file that’s producing output.

Sponsor our Newsletter | Privacy Policy | Terms of Service