php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36352 writing to max sized file "crashes" php/apache
Submitted: 2006-02-10 14:40 UTC Modified: 2006-02-18 01:00 UTC
From: michael202 at gmx dot de Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.1.2 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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michael202 at gmx dot de
New email:
PHP Version: OS:

 

 [2006-02-10 14:40 UTC] michael202 at gmx dot de
Description:
------------
a log-file has reached its maxmimum file size allowed by the 
operation and file system.

Appending further additional byte to this file ends the php and apache process without any message. Nothing in error_log and console output.

Script procession simply stops.


Reproduce code:
---------------
  function append_to_file($aFilename, $aData)
  {
    clearstatcache();
    
      $fh = fopen($aFilename, 'a');
      if ($fh === false) {
        return (-1);
      }
      $result = fwrite($fh, $aData);
      fclose($fh);

    return ($result);
  }


Expected result:
----------------
Error Message or Warning and script continues to execute

tested with
php 5.1.2 and 5.0.5


Actual result:
--------------
script stopped/ended without any notice


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-10 15:15 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2006-02-10 17:43 UTC] michael202 at gmx dot net
File in question is exactly 2147483647 Byte large
1 Byte below 2^31.
 [2006-02-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 14:01:32 2024 UTC