Quick links: Content - sections - sub sections
EN FR
Quick Search Advanced search
 
Page

  [Opened] Erreur 11

Posted by pr_bond on 10/21/2008 23:03

Bonjour

Me revoici lol

J'ai un souci d'erreur 11

Je suis sous windows avec XAMPP 1.6.7 et la version Jelix 1.0.5dev. Je souhaite générer un pdf mais j'obtiens une erreur :

 [error 11] Le sélecteur "mprojets~MyTcPdf"  ne désigne pas une  ressource de type class 	C:\xampp\htdocs\jelix\lib\jelix\core\jSelector.class.php 	345

avec le code suivant :

Fichier pdf.classic.php

 class pdfCtrl extends jController {
    /**
    *
    */
	
    function index() {
    $rep = $this->getResponse('tcpdf');
	
    $pdf = jClasses::createInstance('MyTcPdf');

	
    $pdf->outputFileName = 'bilan.pdf';
    $pdf->doDownload = true;
    
    $pdf->tcpdf->AddPage();
    $pdf->tcpdf->SetFont('Helvetica');
    $pdf->tcpdf->SetTitle('Titre');
    $pdf->tcpdf->Text(10,10,'un texte');  
	
     $rep->tcpdf = $pdf;

	
    return $rep;
   }
 }

 

et le Fichier MyTcPdf.classe.php

 class MyTcPdf extends jTcpdf{

    public function Header(){
        // code to write the header
    }

    public function Footer(){
        // code to write the footer
    }

    // other overloaded methods

    public function buildTable($cols,$rows){
        // build a table of products
    }
 }

Il semblerais que ce problème à déjà été remontré sur ce post http://www.jelix.org/forums/read.php?4,7(..)

Le problème viendrais d'anti slash de windows (euh pas bien) dans le fichier lib/jelix/core/jSelector.class.php

    protected function _createPath(){
        global $gJConfig;
        if (!isset($gJConfig->_modulesPathList[$this->module])) {
            throw new  jExceptionSelector('jelix~errors.selector.module.unknow', $this->toString());
        }
        $this->_path =  $gJConfig->_modulesPathList[$this->module].$this->_dirname.$this->subpath.$this->className.$this->_suffix;
 // DEBUG
 echo $this->_path;
        if (!file_exists($this->_path) || strpos($this->subpath,'..') !== false ) { // second test for security issues
            throw new  jExceptionSelector('jelix~errors.selector.invalid.target', array($this->toString(), $this->type));
        }
    }

Ce qui donne :

  C:\xampp\htdocs\jelix\projet_monetique\modules/mprojets/classes /MyTcPdf.class.php[error 11] Le sélecteur "mprojets~MyTcPdf" ne désigne pas une ressource de type class C:\xampp\htdocs\jelix\lib\jelix\core\jSelector.class.php 346 [warning 1] Cannot modify header information - headers already sent by (output started at  C:\xampp\htdocs\jelix\lib\jelix\core\jSelector.class.php:344) C:\xampp\htdocs\jelix\lib\jelix\core\jResponse.class.php 115 [warning 1] Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\jelix\lib\jelix\core\jSelector.class.php:344) C:\xampp\htdocs\jelix\lib\jelix\core\jResponse.class.php 117 

D'après le post, ce bug à été corrigé dans la 1.0beta 2.1

Ben il est revenu LOL

Qu'es qui faut faire mon capitaine ?

Merci d'avance

A peluche


Mon nom est Bond, James Bond !

  • Windows 7 Pro 64Bits
  • XAMPP 1.7.2
  • Apache 2.2.12
  • PHP 5.3.0
  • MySQL 5.1.37
  • Jelix 1.1.6

  [Opened] Re: Erreur 11

Reply #1 Posted by Julien on 10/22/2008 11:04

Hello,

je ne sais pas si c'est une typo dans ton post ou bien si ton fichier se nomme réellement

 MyTcPdf.classe.php

si c'est le cas, renomme-le en

 MyTcPdf.class.php

Julien

  [Opened] Re: Erreur 11

Reply #2 Posted by laurentj on 10/22/2008 15:27

La version 1.0.6 qui est sortie cette nuit corrige le problème il me semble.

 
Page
  1. Re: manuel daos >
  2. Re: Petit prob. avec mon url significant >
  3. Git ou Mercurial >
  4. traitements en ligne de commande - "Unknown module" >
  5. Re: Instruction SQL dans update dao >
  6. [Résolu] jAcl2 et les verifications automatiques >
  7. Probleme Conf smtp jMailer >
  8. Re: Erreur 11