php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1031 unlink causes seg fault
Submitted: 1999-01-05 14:21 UTC Modified: 1999-01-06 01:19 UTC
From: michael at irc dot net Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.6 OS: Linux 2.0.36 - Red Hat 5.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michael at irc dot net
New email:
PHP Version: OS:

 

 [1999-01-05 14:21 UTC] michael at irc dot net
--pdf.php3--

<?
header("Content-type: application/pdf");

$fd = fopen("/tmp/hello.pdf", "w");

$info = PDF_get_info();
PDF_set_info_creator($info, "bleh");
PDF_set_info_title($info, "hello $REMOTE_HOST");
PDF_set_info_subject($info, "hello $REMOTE_HOST");
PDF_set_info_keywords($info, "hello $REMOTE_HOST");
PDF_set_info_author($info, "bleh");
$pdffd = pdf_open($fd, $info);
PDF_begin_page($pdffd, 595.0, 842.0);
PDF_set_font($pdffd, "Helvetica-Bold", 20.0, winansi);
PDF_set_text_pos($pdffd, 50, 700);
PDF_show($pdffd, "Hello $REMOTE_HOST!\n");
pdf_show_xy($pdffd, date("l dS of F Y h:i:s A"), 30.0, 400.0);
PDF_end_page($pdffd);
PDF_close($pdffd);

fclose($fd);

$pdfdocument = readfile("/tmp/hello.pdf");
echo $pdfdocument;
//system("rm /tmp/hello.pdf");

unlink("/tmp/hello.pdf");
?>

--EOF--

./configure --with-mysql=/usr --with-gd --with-zlib --with-apache=../apache_1.3.3 --enable-track-vars --with-pdflib

--/var/log/httpd/error_log--
[Tue Jan  5 11:10:14 1999] [notice] httpd: child pid 7397 exit signal Segmentation fault (11)
----

PHP wouldn't generate a core file..I ran httpd -X as root and did unlimit coredumpsize...find / -name core reports nothing  :\

unlink causes the crash, though if i comment unlink out, and use system, it works...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-01-06 01:19 UTC] rasmus
This turned out to be a bug in pdf_close() which has now been fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC