php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6133 unlink() seems to crash php
Submitted: 2000-08-12 19:08 UTC Modified: 2000-09-03 05:57 UTC
From: plexus at liscom dot dk Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.1pl2 OS: Linux
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: plexus at liscom dot dk
New email:
PHP Version: OS:

 

 [2000-08-12 19:08 UTC] plexus at liscom dot dk
Short Error Description:
----------------------------------------

I am having trouble using the unlink() function. Everytime I try to unlink a specific file, it crashes, I get an invalid http response, though it seems to delete the file as it should.
eg:

<?
unlink("/home/gamesite/testfile");
?>

When I run this, I get an invalid header back, but it seems to delete the file, I checked the apache error log, and found a crash.


The Server Specs:
----------------------------------------

Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.16 on an i686 

PHP Configure Command:
./configure' '--with-mysql=/home/mysql/mysql' '--with-apxs=/usr/local/apache/bin/apxs'

SERVER_SOFTWARE:
Apache/1.3.12 (Unix) PHP/4.0.1pl2


The Error:
----------------------------------------

This is what it says in the apache error log:
[Sun Aug 13 00:34:12 2000] [notice] child pid 1838 exit signal Segmentation fault (11) 

And the backtrace:

(gdb) Core was generated by `/usr/local/apache/bin/httpd'.
Program terminated with signal 11, Segmentation fault.

(gdb) bt
#0  0x402cc490 in ?? ()
#1  0x807e34e in clean_parent_exit ()
#2  0x8080dd3 in standalone_main ()
#3  0x80812b3 in main ()
#4  0x400b99cb in __libc_start_main (main=0x8080f6c <main>, argc=1,
    argv=0xbffffd54, init=0x804ed70 <_init>, fini=0x80b528c <_fini>,
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffd4c)

    at ../sysdeps/generic/libc-start.c:92


I am not sure if I used the correct core file for the backtrace, hopefully I did.
I hope you can solve this problem/bug. Thanks.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-15 07:00 UTC] stas@php.net
Does it happen with latest CVS too?

Does it happen when you do unlink only, nothing more? 
Is there something special about that file?
 [2000-08-15 12:10 UTC] plexus at liscom dot dk
I havent tried with the latest CVS, I dont have time to do extensive testing :(
Neither do I have that kind of access to the server (to install a new version).

Yes, it first happened in a complicated script, then I tried using the script below, with unlink as the only PHP command. Same problem, invalid header sent back.

There is nothing special about the file, the webserver/php has full access to it, and I tried different files, same problem.
 [2000-09-03 05:57 UTC] stas@php.net
Cannot reproduce it on latest CVS, so I guess it's fixed. If not, please reopen.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Sep 20 01:00:01 2025 UTC