PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Logging » Log » Bug #3989

_mkdate recursion broken for windows

Details

Submitted2005-03-29 06:36 UTC
Fromrob at wildlime dot com
Assignedjon
StatusNo Feedback
PackageLog
PHP Version4.3.10
OSWindows XP SP2
Roadmaps(Not assigned)

Comments

[2005-03-29 06:36 UTC] rob at wildlime dot com

Description:
------------
using Log 1.8.7

Warning: _mkpath(): Maximum recursion depth (25) exceeded in c:\php\pear\Log\file.php on line 160

the recursion goes like this:
_mkpath('c:\test\test');
_mkpath('c:\test');
_mkpath('c:\');
_mkpath('c:\');
_mkpath('c:\');
_mkpath('c:\');
_mkpath('c:\');
_mkpath('c:\');
...
(barf)

ie, it doesn't handle windows paths properly

[2005-04-05 07:59 UTC] rob at wildlime dot com

For a while I too was unable to reproduce it, but it's finally happened again. I don't know why it hasn;t happened in the many other times this script has been run in the last couple of days.

The file name parameter is "c:/temp/debug.log". It's being called by apache running as me - the local system admin - so it definitely has create dir rights.

Incidentally, the first recursion is with the parameter "c:\temp", so that would rule out any oddity caused by the fact that I'm using forward slashes initially.

btw, the c:\temp directory exists and has always existed, so it shouldn't be trying to create it at all...