Hallo Joomlafreunde,
in dem Paket Xampp 1.7.3, das ich im Zusammenhang mit Kunena 1.6.1 installieren musste, war auch PHP 5.3.1 enthalten. Zufällig ist mir heute aufgefallen, dass beim Anklicken des PDF-Links im Joomla-Content-Bereich (Beiträge) folgende Fehlermeldung kommt:
Parse error: syntax error, unexpected T_STRING in C:\apachefriends\xampp\htdocs\Joomla\libraries\tcp df\tcpdf.php on line 3238.
Folgende Funktion ist betroffen:
/**
* Adds fonts
* _putfonts
* @access protected
*/
function _putfonts() {
$nf=$this->n;
foreach($this->diffs as $diff) {
//Encodings
$this->_newobj();
$this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
$this->_out('endobj');
}
$mqr=get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
foreach($this->FontFiles as $file=>$info) {
Font file embedding
$this->_newobj();
$this->FontFiles[$file]['n']=$this->n;
$font='';
$f=fopen($this->_getfontpath().strtolower($file),'rb',1);
if(!$f) {
$this->Error('Font file not found: '.$file);
}
while(!feof($f)) {
$font .= fread($f, 8192);
}
fclose($f);
$compressed=(substr($file,-2)=='.z');
if(!$compressed && isset($info['length2'])) {
$header=(ord($font{0})==128);
if($header) {
//Strip first binary header
$font=substr($font,6);
}
if($header && ord($font{$info['length1']})==128) {
//Strip second binary header
$font=substr($font,0,$info['length1']).substr($font,$info['length1']+6);
}
}
$this->_out('<</Length '.strlen($font));
if($compressed) {
$this->_out('/Filter /FlateDecode');
}
$this->_out('/Length1 '.$info['length1']);
if(isset($info['length2'])) {
$this->_out('/Length2 '.$info['length2'].' /Length3 0');
}
$this->_out('>>');
$this->_putstream($font);
$this->_out('endobj');
}
set_magic_quotes_runtime($mqr);
foreach($this->fonts as $k=>$font) {
//Font objects
$this->fonts[$k]['n']=$this->n+1;
$type=$font['type'];
$name=$font['name'];
if($type=='core') {
//Standard font
$this->_newobj();
$this->_out('<</Type /Font');
$this->_out('/BaseFont /'.$name);
$this->_out('/Subtype /Type1');
if($name!='Symbol' && $name!='ZapfDingbats') {
$this->_out('/Encoding /WinAnsiEncoding');
}
$this->_out('>>');
$this->_out('endobj');
} elseif($type=='Type1' OR $type=='TrueType') {
//Additional Type1 or TrueType font
$this->_newobj();
$this->_out('<</Type /Font');
$this->_out('/BaseFont /'.$name);
$this->_out('/Subtype /'.$type);
$this->_out('/FirstChar 32 /LastChar 255');
$this->_out('/Widths '.($this->n+1).' 0 R');
$this->_out('/FontDescriptor '.($this->n+2).' 0 R');
if($font['enc']) {
if(isset($font['diff'])) {
$this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
} else {
$this->_out('/Encoding /WinAnsiEncoding');
}
}
$this->_out('>>');
$this->_out('endobj');
//Widths
$this->_newobj();
$cw=&$font['cw'];
$s='[';
for($i=32;$i<=255;$i++) {
$s.=$cw[chr($i)].' ';
}
$this->_out($s.']');
$this->_out('endobj');
//Descriptor
$this->_newobj();
$s='<</Type /FontDescriptor /FontName /'.$name;
foreach($font['desc'] as $k=>$v) {
$s.=' /'.$k.' '.$v;
}
$file = $font['file'];
if($file) {
$s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
}
$this->_out($s.'>>');
$this->_out('endobj');
} else {
//Allow for additional types
$mtd='_put'.strtolower($type);
if(!method_exists($this, $mtd)) {
$this->Error('Unsupported font type: '.$type);
}
$this->$mtd($font);
}
}
}
In Zeile 3238 steht: Font file embedding
Ursprünglich wurde die Zeile 3236 als fehlerhaft gemeldet: set_magic_quotes_runtime(0);
Da ich von PHP keine Ahnung habe, komme ich nicht weiter. Vieleicht kann mir jemand helfen mit einer genauen Anleitung zur Behebung des Fehlers. In anderen Internetforen habe ich Hinweise darauf gefunden, dass der Fehler auf PHP 5.3 < zurück zu führen ist.Deshalb meine ausführliche Darstellung.
Ich arbeite mit Joomla 1.5.22.
Danke im Voraus
Christkind


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen