HTTP ERROR 500

Questions related to nuBuilder Forte Reports and the Report Builder.

Re: HTTP ERROR 500

Postby admin » Sat May 12, 2018 7:15 am

marcvander,

Sorry but I have no idea - you need to give us more information.

For example...

- What does your SQL look like?
- What do you do in Before Edit of RECHERERPOINTAGE.
- Have you tried to create a Report manually?

Steven
admin
Site Admin
 
Posts: 3135
Joined: Mon Jun 15, 2009 9:53 am

Re: HTTP ERROR 500

Postby toms » Sat May 19, 2018 11:32 pm

I also got HTTP ERROR 500. After consulting the log file, I have actually figured out and fixed the problem. For some reason nurunpdf.php was trying to load the font cid0jp.php and this caused a fatal error (memory exhaused)

[Sat May 19 11:54:21 2018] [error] [client 206.189.56.121] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /home/www/web100/html/nuBuilder4/tcpdf/fonts/cid0jp.php on line 15


I have no idea why, the report I created only uses the standard font. My quickfix was to replace these files with a standard font.

Code: Select all
cid0kr.php
cid0jp.php
cid0ct.php
cid0cs.php
toms
 

Re: HTTP ERROR 500

Postby admin » Mon May 21, 2018 4:26 pm

marcvander,

Sorry, I don't know.

Steven
admin
Site Admin
 
Posts: 3135
Joined: Mon Jun 15, 2009 9:53 am

Re: HTTP ERROR 500

Postby marcvander » Mon May 21, 2018 5:45 pm

Hey toms,

thanks for your findings! When you say "My quickfix was to replace these files with a standard font.", what did you actually replace it with?

Did you change the content of the files, or did you delete them?

Thanks,

Marc
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 101
Joined: Tue Mar 27, 2018 1:27 am

Re: HTTP ERROR 500

Postby toms » Mon May 21, 2018 6:02 pm

I made 4 copies of the file helvetica.php

Then renamed the first copy to cid0kr.php
The 2nd copy to cid0jp.php
The 3rd copy to cid0ct.php
The 4th copy to cid0cs.php

So basically, I deleted the original files (cid0kr.php ... cid0cs.php) and then made a copy from the helvetia font and renamed these copies.
In this way, the pdf engine will still find the original font files but their content is different - which is the one from helvetia font.
toms
 

Re: HTTP ERROR 500

Postby marcvander » Wed May 23, 2018 6:06 pm

Hey toms,

so I've done what you said. Now when I run a report, instead of having ERROR 500, I have: TCPDF ERROR: Could not include font definition file: arial
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 101
Joined: Tue Mar 27, 2018 1:27 am

Re: HTTP ERROR 500

Postby toms » Wed May 23, 2018 6:17 pm

Does the font helvetica still exist?

I see in the source code that Arial is mapped to helvetica.

Code: Select all
      // normalize family name
      $family = strtolower($family);
      if ((!$this->isunicode) AND ($family == 'arial')) {
         $family = 'helvetica';
      }


helvetica.png
helvetica.png (17.63 KiB) Viewed 2660 times
toms
 

Re: HTTP ERROR 500

Postby marcvander » Wed May 23, 2018 9:01 pm

Yes I still have helvetica.php. Where did you see this code:

Code: Select all
      // normalize family name
      $family = strtolower($family);
      if ((!$this->isunicode) AND ($family == 'arial')) {
         $family = 'helvetica';
      }


I will try to see if I have it as well
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 101
Joined: Tue Mar 27, 2018 1:27 am

Re: HTTP ERROR 500

Postby toms » Wed May 23, 2018 9:43 pm

It's an extract from tcpdf.php

What you could also try: make a copy of helvetica.php and rename it to arial.php
toms
 

Re: HTTP ERROR 500

Postby toms » Wed May 23, 2018 9:48 pm

The reason could be that you are using some characters that are not included in your selected font (normally helveticva). Hence the pdf engine is loading another font to display these characters.

This is just a guess after I've seen this information on another website:
https://www.dolibarr.fr/forum/527-bugs- ... depuis-3-0
Code: Select all
Je me réponds, j'ai trouvé ...
Doli utilisait FPDF auparavant et utilise maintenant TCPDF.
Syntaxe très proche, mais Arial n'est pas inclue par défaut.

Et pour avoir cherché ... si cela peut intéresser qq'un, pour afficher le signe €, il faut utiliser $pdf->unichr(8364). Par exemple :
$pdf->Cell(18, 0, $pdf->unichr(8364),0,0,C);
toms
 

PreviousNext

Return to Reports



cron