php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8626 Memory fault when having a image in the PDF Document
Submitted: 2001-01-10 03:22 UTC Modified: 2001-01-10 07:30 UTC
From: peter dot caflisch at bit dot admin dot ch Assigned:
Status: Closed Package: PDF related
PHP Version: 4.0.4 OS: Compaq True64 UNIX
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peter dot caflisch at bit dot admin dot ch
New email:
PHP Version: OS:

 

 [2001-01-10 03:22 UTC] peter dot caflisch at bit dot admin dot ch
Memory fault when having a image in the PDF Document 
Only with php-4.0.4 with php-4.0.3pl1 it was OK.
The same behaviour when used with a .png image. 
Also the same behaviour when using pdflib-3.0 or pdflib-3.0.3.

Testscript:
<?
$tempfile = tempnam ("/tmp", "pdf");
$fp = fopen("$tempfile", "w");

$pdf = pdf_open($fp);
pdf_set_info($pdf, "Author", "Peter Caflisch");
pdf_set_info($pdf, "Title", "Test");
pdf_set_info($pdf, "Creator", "Peter Caflisch");
pdf_set_info($pdf, "Subject", "erstellt am: $datum");

pdf_begin_page($pdf, 595, 842);
pdf_add_outline($pdf, "Seite ".$seite. "  A.." );

$im = pdf_open_image_file($pdf, "gif", "efdlogo.gif");
pdf_place_image($pdf, $im, 18, 790, 0.8);
pdf_close_image($pdf, $im);
pdf_end_page($pdf);
pdf_end_page($pdf);
pdf_close($pdf);
fclose($fp);

$fp1 = fopen("$tempfile", "r");
   header("Content-type: application/pdf");
fpassthru($fp1);
unlink ($tempfile);
?>


RESULTS
-----------
with php-4.0.4:
>php testpdf.php
>Memory fault

with php-4.0.3pl1:
>php testpdf.php
>
Is the same as a apache module.



CONFIG:
tar -xvf ../number4.tar
CC=gcc ./configure  --with-mysql=/appl/mysql --enable-bcmath --with-imap=/appl/imap \
--without-iodbc --without-udbc --with-openlink=/appl --with-pdflib --without-yaz \
 --with-gd --with-zlib-dir=/appl/zlib --with-ldap --with-jpeg-dir=/appl/jpeg-6b \
 --enable-ftp --enable-track-vars
make
make install

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-10 07:30 UTC] sniper@php.net
This is fixed in CVS. Please try the latest snapshot from http://snaps.php.net/
and if it doesn't work either,  reopen this bug report.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC