Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6498 invoked by uid 1010); 24 Mar 2007 18:15:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6481 invoked from network); 24 Mar 2007 18:15:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Mar 2007 18:15:31 -0000 Received: from [127.0.0.1] ([127.0.0.1:18178]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 3A/EC-07072-3CA65064 for ; Sat, 24 Mar 2007 13:15:31 -0500 Authentication-Results: pb1.pair.com smtp.mail=support@oeko.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=support@oeko.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain oeko.net from 193.221.127.139 cause and error) X-PHP-List-Original-Sender: support@oeko.net X-Host-Fingerprint: 193.221.127.139 c.mx.oeko.net OpenBSD 3.0-3.4 Received: from [193.221.127.139] ([193.221.127.139:36261] helo=w8.oeko.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/8C-07072-E8765064 for ; Sat, 24 Mar 2007 13:01:51 -0500 Received: (qmail 16868 invoked from network); 24 Mar 2007 18:01:46 -0000 Received: from foo.oeko.net (HELO oak.oeko.net) ([193.221.127.48]) (envelope-sender ) by w8.oeko.net (qmail-ldap-1.03) with SMTP for ; 24 Mar 2007 18:01:46 -0000 Received: (qmail 23573 invoked by uid 1000); 24 Mar 2007 18:01:46 -0000 Message-ID: <20070324180146.23572.qmail@oak.oeko.net> Date: Sat, 24 Mar 2007 19:01:46 +0100 To: internals@lists.php.net Cc: support@oeko.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i Subject: PHP Bug 35748 From: support@oeko.net (Toni Mueller) 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
\n" : "not a dir $d
\n"; } chdir ('files'); print '

in files

'; @dirs = ("/", ".", "explorer", "explorer.old", 'out'); for $d (@dirs) { print -d $d? "dir $d
\n" : "not a dir $d
\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: info@oeko.net 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?