Forum

[SOLVED] Missing HT...
 
Notifications
Clear all

[SOLVED] Missing HTML2PDF_locale.php

8 Posts
2 Users
0 Reactions
13.8 K Views
(@ericzen)
Posts: 24
Active Member
Topic starter
 
[#2780]

Hello,

I'm trying to generate PDF report and nothing done. In the log files there are messages which informed that html2pdf_locale.php is missing.

If i verify in the 5.1.4.zip, this file is not present in model folder. Is it normal ?

Ericzen


 
Posted : 02 Dec 2015 21H07
(@ericzen)
Posts: 24
Active Member
Topic starter
 

I don't understand. I've open many versions of Projeqtor and this file is not present. Where is the problem with my config ?


 
Posted : 02 Dec 2015 21H28
(@babynus)
Posts: 14952
Member Admin
 

I confim that this file does not exist.
And PDF files are correctly generated without it :silly:
(You can check at https://demo.projeqtor.org)


 
Posted : 02 Dec 2015 21H45
(@babynus)
Posts: 14952
Member Admin
 

Could you post exact message logged ?
Which version of PHP are you using ?

(edit) I found issues about using html2pdf with PHP =5.2


 
Posted : 02 Dec 2015 21H45
(@ericzen)
Posts: 24
Active Member
Topic starter
 

I use PHP 5.5.

Here is the log trace :

2015-12-02 18:47:39.279 ===== TRACE ===== Cron started at 02/12/2015 18:47:39
2015-12-02 18:48:49.700 ** ERROR ** Impossible to load class HTML2PDF_locale
=> Not found in ../model/custom/HTML2PDF_locale.php
=> Not found in ../model/HTML2PDF_locale.php
=> Not found in ../model/persistence/HTML2PDF_locale.php

2015-12-02 18:49:00.989 ** ERROR ** Impossible to load class HTML2PDF_locale
=> Not found in ../model/custom/HTML2PDF_locale.php
=> Not found in ../model/HTML2PDF_locale.php
=> Not found in ../model/persistence/HTML2PDF_locale.php

Thanks for your help


 
Posted : 02 Dec 2015 22H03
(@babynus)
Posts: 14952
Member Admin
 

It is a issue produced with PHP < 5.3
To have this work for PHP < 5.3, comment lines 4005 to 4007 in /model/persistence/SqlElement.php from

//	  if (! is_a($className, 'SqlElement', true )) {
//	    traceHack("Class '$className' does not extend SqlElement");
//	  }

Note that this mau introduce secuirity leak.
Better solution will be proposed in V5.2.


 
Posted : 03 Dec 2015 14H26
(@babynus)
Posts: 14952
Member Admin
 

Very stange, it seems that html2pdf class used in your case is not the one included in PRojeQtOr.
The expected correct file /external/html2pdf/html2pdf.class.php starts with :

 PDF convertor
 * distributed under the LGPL License
 *
 * @author  Laurent MINGUET 
 * @version 4.03
 */
 
if (!defined('__CLASS_HTML2PDF__')) {

    define('__CLASS_HTML2PDF__', '4.03');
    define('HTML2PDF_USED_TCPDF_VERSION', '5.0.002');
	
    require_once(dirname(__FILE__).'/_class/exception.class.php');
    require_once(dirname(__FILE__).'/_class/locale.class.php');
    require_once(dirname(__FILE__).'/_class/myPdf.class.php');
    require_once(dirname(__FILE__).'/_class/parsingHtml.class.php');
    require_once(dirname(__FILE__).'/_class/parsingCss.class.php');

    class HTML2PDF

The line
require_once(dirname(__FILE__).'/_class/locale.class.php');
includes correct class file for HTML2PDF_locale objects, so ProjeQtOr autoloader should not try to load this class definition.

1) What is your PHP version
2) what is your PHP stack (zend, linux php, WAMP, ...)
3) do you have other PHP applications running on same server, and if yes do they also usde HTML2PDF ?


 
Posted : 03 Dec 2015 14H33
(@ericzen)
Posts: 24
Active Member
Topic starter
 

I've reinstalled projeqtor on an other server and now all is fine !

Thanks


 
Posted : 04 Dec 2015 18H19
Share:

Scroll to Top