Hello Sniper,

I see the problem re-appearing on OpenBSD 4.0. Since I don't have an
account on www.php.net, I copy&paste what I'd normally have appended to
the bug to you, in the hope that you find appropriate ways to deal with
it. Please let me tell you up front that I can't do much about it,
especially not migrating to PHP5.x, because this problem breaks a
commercial third-party software, and that third-party software is
incompatible with PHP5. I just have to somehow live with it.

Now the problem details:

I'd like to see this bug re-opened. On OpenBSD 4.0 and with PHP 4.4.6
as an Apache module, I can see completely random results. I'm running
an application here that uses is_dir() quite a bit, and the actuual
results, using the posted test program with the modification that
clearstatcache() is called in the loop, before calling is_dir(), are
like this:

non dir /
dir .
dir config
non dir config/ast_xml_config.inc.php
dir files
non dir ./files/incoming/
non dir /files/out
non dir bogus-path
non dir error.php
dir code
non dir index.php
in files
non dir /
dir .
non dir explorer
non dir explorer.old
non dir out


The corrected results would have been this:

dir /
dir .
dir config
non dir config/ast_xml_config.inc.php
dir files
dir ./files/incoming/
dir /files/out
non dir bogus-path
non dir error.php
dir code
non dir index.php

in files

dir /
dir .
non dir explorer
dir explorer.old
dir out

The non-dir result for 'explorer' is somewhat debatable because it is a
symlink to a dir. I'm unsure if that should then be a dir or a non-dir
in the view of PHP developers. I've rewritten the test program with
Perl which gives correct results:

#!/usr/bin/perl -w

use CGI;
$q = new CGI;

print $q->header(-nph=> 1), $q->start_html ('Testprogramm fuer stat-Aufruf');

@dirs = ("/", '.', 'config', 'config/ast_xml_config.inc.php',
              'files', './files/incoming/','./files/out', 'bogus-path',
              'error.php', "code", "index.php");

for $d (@dirs) {
        print -d $d? "dir $d<br>\n" : "not a dir $d<br>\n";
}
chdir ('files');
print '<h2>in files</h2>';

@dirs = ("/", ".", "explorer", "explorer.old", 'out');

for $d (@dirs) {
        print -d $d? "dir $d<br>\n" : "not a dir $d<br>\n";
}
print $q->end_html();


It would be great if you could let me know about the outcome of this
problem.


Kind Regards,

Toni Mueller.

--------                        AS29394         TM28-RIPE
Oeko.neT Mueller & Brandt GbR                   sales: [EMAIL PROTECTED]
v: +49 2261 979364 f: +49 2261 979366           http://www.oeko.net
consulting, systems administration, software development, Python, Perl,
networking, Unix, Debian Linux, OpenBSD, Internet services, trainings
GPG: 1024D/68BDA342; FP=3312 D609 AD2E 8C05 D494 139E 8419 E0DB 68BD A342

A. Because it breaks the logical sequence of discussion.
Q. Why is top posting bad?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to