Jump to content

FPDF error: Some data has already been output, can't send PDF file


edward94

Recommended Posts

Witam,

 

mam problem z generowaniem faktury proforma, próby wygenerowania kończą się na: 

FPDF error: Some data has already been output, can't send PDF file

 

po włączeniu raportowania błędów nie wyskakuje nic więcej, próbowałem już:

 

 

Go to [tools] folder - > Open [fpdf] folder - Open fpdf.php file

 
Line no:992 
function Output($name='', $dest='')
{
 ob_clean();

 

 
 

 

 

Do pliku tools/fpdf/fpdf.php zaraz pod <?php trzeba dopisać: error_reporting(0);

 

 

 

<?phpinclude(dirname(__FILE__).'/config/config.inc.php');//include(dirname(__FILE__).'/init.php');

 

 

Nic z tego nie działa problem jak był tak jest. Problem pojawił się po tym jak chciałem zmienić jeden wyraz w tłumaczeniu, po czym zaczął się pojawiać w/w błąd. Jeśli ktoś ma jakiś pomysł to byłbym bardzo zobowiązany za pomoc.

 

Link to comment
Share on other sites

Jedyny plik jaki edytowałem robiłem to w Total Comander poprzez opcje edytuj, nawet po usunięciu tego pliku błąd dalej wyskakuje, jednak odkryłem coś nowego po wpisaniu 

 

Go to [tools] folder - > Open [fpdf] folder - Open fpdf.php file

 
Line no:992 
function Output($name='', $dest='')
{
 ob_clean();

 

 
 
Wtedy pokazuje się błąd
 

Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in /home/users/moon-pearl/public_html/tools/fpdf/fpdf.php on line 1727
Link to comment
Share on other sites

Masz błędy w składni php.

Błąd Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION występuje najczęściej, gdy został gdzieś pominięty średnik przed wywołaniem warunku if.

Masz jakąś starą wersję presty, bo jest klasa fpdf, a w nowej preście jest tcpdf.

Pobierz dokładnie swoją wersję presty:

https://www.prestashop.com/pl/wersje-deweloperskie#previous-version

I wgraj oryginalną klasę fpdf.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...