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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 16:01:31 2024 UTC