How to find a bug: is_link troubles

From: Date: Wed, 02 May 2007 19:27:04 +0000
Subject: How to find a bug: is_link troubles
Groups: php.internals 
Request: Send a blank email to internals+get-29132@lists.php.net to get a copy of this message
Hi, I've got a bug with is_link and lstats. Any symlinks not created in the current session, will not be read. This only occurs in the Apache 2 SAPI version, not in the CLI version. Script: /<? $symlink = '/tmp/link-test'; if (file_exists($symlink)) unlink($symlink); symlink('/tmp/pear', $symlink); echo (file_exists($symlink) ? is_link($symlink) ? "Correct" : "ERROR" : "Couldn't create the link"), "<br/>\n"; $symlink = '/tmp/link-persist'; if (!file_exists($symlink)) symlink('/tmp/pear', $symlink); echo (file_exists($symlink) ? is_link($symlink) ? "Correct" : "ERROR" : "Couldn't create the link"), "<br/>\n"; ?>/ First run: / Correct Correct / Second run: / Correct ERROR/ Next runs: / Correct ERROR /I've recently start using the daily snapshots op PHP, but I also tried it on version 5.2.1, which shows the same result. It used to work just fine, so I'm sure this isn't the expected result. I've recently upgraded from Ubuntu Edgy (6.10) to Feisty (7.04), with kernel and apache update, so I believe that the problem is related to that. I've straced the process (see attachment), but I can't pinpoint the problem. This is a big issue for me, can anyone point me in the right direction to find the source of this problem. Thanks, Arnold

« previous php.internals (#29132) next »