How to find a bug: is_link troubles

php.internals

Arnold Daniels

19 years ago
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

Tijnema !

19 years ago
On 5/2/07, Arnold Daniels <info@adaniels.nl> wrote:
> 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 >
<snip> Well, I've also tested this code, and it does work fine. BUT if /tmp/pear doesn't exists, what i had at first, then file_exists returns false, because file_exists follows symlinks, and the symlink pointed to nothing. So if you're sure that $symlink is a link, then it might be better to check it with is_link. Also, the is_link function is cached, so you might want to add one or more clearstatcache() in your script. I checked your strace also, but it doesn't look like there's a bug. But I've never studied on the PHP core so.... Well, if above doesn't help you, then one of the "real experts" needs to look at it :) Tijnema

Arnold Daniels

19 years ago
Hi again, Thanks for your reply. I think perhaps I've not been totally clear on my last e-mail. The directory does exist. If this dir or symlink would not exist, the code would have outputted "Couldn't create the link". The fact that is goes well right after the symlink is just created, is indeed the cause of the stat cache. But the actual problem is that the symlink is not recognized as a symlink. It seems to be dereferenced by functions like 'lstat', 'is_link' and 'filetype'. And that isn't supposed to happen. The problem has probably something to do with my system in combination with apache/php. So I guess reporting it as a bug won't do, because it will simply be filed under 'works here'. If anybody has any clue what is going on here, please let me know. For the record I've updated to CVS snapshot of May 10, 2007 14:30 GMT, but it didn't work with older version as well. Let me give another example, with which I hope I can make the problem clearer. ------------ Script: <? $symlink = '/tmp/link-test'; $target = '/tmp/pear'; if (!file_exists($target)) trigger_error("Target '$target' does not exist", E_USER_ERROR); if (file_exists($symlink) && !unlink($symlink)) trigger_error("Could not delete '$symlink'", E_USER_ERROR); symlink($target, $symlink); clearstatcache(); /* This should output 'link' */ echo filetype($symlink), "\n"; /* This should output 'link' */ echo is_link($symlink) ? 'link' : 'not a link', "\n"; /* This should output 'differ' */ echo lstat($symlink) === stat($target) ? 'same' : 'differ'; ?> Expected: link link differ Actual: dir not a link same ------------ Thanks for any help, Arnold Tijnema ! wrote:

Arnold Daniels

19 years ago
Hi, I've posted this problem some time ago, but never got a real answer and it is still bothering me a lot. My problem is that PHP does not recognize a symlink as a symlink. It seems to be dereferenced by functions like 'lstat', 'is_link' and 'filetype'. And that isn't supposed to happen. The bug http://bugs.php.net/bug.php?id=17128 describes my problem exactly, but is marked as bogus. Well this problem sure isn't bogus for me. I'm having this problem, since I've updated from Ubuntu Edgy to Feisty. Before that all worked fine. Please note that I've not installed PHP from a repository, but I build the latest CVS version of PHP 5 regularly myself. Also this problem only occurs in the Apache 2 SAPI, not in the CLI version. Let me give an example, to make the problem clear. ------------ <? $symlink = '/tmp/link-test'; $target = '/tmp/pear'; if (!file_exists($target)) trigger_error("Target '$target' does not exist", E_USER_ERROR); if (file_exists($symlink) && !unlink($symlink)) trigger_error("Could not delete '$symlink'", E_USER_ERROR); symlink($target, $symlink); clearstatcache(); /* This should output 'link' */ echo filetype($symlink), "\n"; /* This should output 'link' */ echo is_link($symlink) ? 'link' : 'not a link', "\n"; /* This should output 'differ' */ echo lstat($symlink) === stat($target) ? 'same' : 'differ'; ?> Expected: link link differ Actual: dir not a link same ------------ I understand that if I post this as a bug, it is tested, can't be reproduced and marked as bogus. Therefore, I could appreciate it if someone could please point me towards a way to pinpoint the problem. I've run a strace already, but can't notice anything weird. Thanks for any help, Arnold

Rasmus Lerdorf

19 years ago
So, would this be Ubuntu 7.04? I happen to have one of those boxes sitting here: 5:52pm ubuntu:~> mkdir /tmp/pear 5:52pm ubuntu:~> cat /etc/issue Ubuntu 7.04 \n \l 5:52pm ubuntu:~> uname -a Linux ubuntu 2.6.20-15-server #2 SMP Sun Apr 15 07:41:34 UTC 2007 i686 GNU/Linux 5:52pm ubuntu:~> php p link link differ 5:52pm ubuntu:~> l /tmp | grep link lrwxrwxrwx 1 rasmus rasmus 9 2007-05-23 17:52 link-test -> /tmp/pear/ The 'p' script is just a copy of paste of your script from this message. -Rasmus Arnold Daniels wrote:

Brian Moon

19 years ago
Rasmus Lerdorf wrote:
> 5:52pm ubuntu:~> php p
I think he said "Also this problem only occurs in the Apache 2 SAPI, not in the CLI version." =)
-- Brian Moon Senior Developer ------------------------------ http://dealnews.com/ It's good to be cheap =)

Rasmus Lerdorf

19 years ago
Brian Moon wrote:
> Rasmus Lerdorf wrote: >> 5:52pm ubuntu:~> php p > > I think he said "Also this problem only occurs in the Apache 2 SAPI, not > in the CLI version."
Works fine under Apache1. I don't have Apache2 handy on this box. But I can't see this being affected by the SAPI in any way other than user permissions and/or some sort of SELinux restriction. As in, things external to PHP itself. So, if someone who knows their way around strace can reproduce this problem and show me the series of syscalls and their exit status, we can probably figure out what is happening. I'm about 90% sure this is not a PHP problem, but rather a system configuration problem. -Rasmus

Scott MacVicar

19 years ago
I'm getting similar results from a RHEL 4 box we have here, its running 5.2.3-dev. scott@scarlet [/tmp] # cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant Update 4) scott@scarlet [~] # uname -a Linux scarlet 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686 i686 i386 GNU/Linux scott@scarlet [/tmp] # php test.php dir not a link same strace for the during execution is. lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 readlink("/tmp/link-test", "/tmp/pear", 4096) = 9 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "dir", 3dir) = 3 write(1, "\n", 1) = 1 write(1, "not a link", 10not a link) = 10 write(1, "\n", 1) = 1 time(NULL) = 1179958429 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "same", 4same) = 4 Scott Arnold Daniels wrote:

Rasmus Lerdorf

19 years ago
lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", 0xbff229ec) = -1 ENOENT (No such file or directory) lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 symlink("/tmp/pear", "/tmp/link-test") = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "differ", 6differ) = 6 Scott MacVicar wrote:
> I'm getting similar results from a RHEL 4 box we have here, its running > 5.2.3-dev. > > scott@scarlet [/tmp] # cat /etc/redhat-release > Red Hat Enterprise Linux ES release 4 (Nahant Update 4) > > scott@scarlet [~] # uname -a > Linux scarlet 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 > i686 i686 i386 GNU/Linux > > scott@scarlet [/tmp] # php test.php > dir > not a link > same > > strace for the during execution is. > > lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 > lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0
That means /tmp/link-test exists already, otherwise lstat returns -1. Here is what I see if the link already exists when I run my script: access("/tmp/pear", F_OK) = 0 access("/tmp/link-test", F_OK) = 0 unlink("/tmp/link-test") = 0 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", 0xbff229ec) = -1 ENOENT (No such file or directory) lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 symlink("/tmp/pear", "/tmp/link-test") = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "differ", 6differ) = 6 So did you leave out those access() calls, and did they fail, or did the unlink() fail perhaps? -Rasmus

Scott MacVicar

19 years ago
Miscopied, a full strace is: lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 access("/tmp/pear", F_OK) = 0 time(NULL) = 1179959483 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 readlink("/tmp/link-test", "/tmp/pear", 4096) = 9 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 access("/tmp/pear", F_OK) = 0 unlink("/tmp/link-test") = 0 time(NULL) = 1179959483 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", 0xbff2137c) = -1 ENOENT (No such file or directory) time(NULL) = 1179959483 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 symlink("/tmp/pear", "/tmp/link-test") = 0 time(NULL) = 1179959483 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 readlink("/tmp/link-test", "/tmp/pear", 4096) = 9 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "dir", 3dir) = 3 write(1, "\n", 1 ) = 1 write(1, "not a link", 10not a link) = 10 write(1, "\n", 1 ) = 1 time(NULL) = 1179959483 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "same", 4same) = 4 SELinux is disabled on the box. Scott Rasmus Lerdorf wrote:

Brian Moon

19 years ago
Works as expected on my Mac (no strace on my Mac). On my Gentoo 64-bit server, I get the wrong data from Apache2 and CLI. On my 32-bit Gentoo server, without Apache 2, I get the correct answer from apache and cli. On my 32-bit Gentoo server with Apache 2 I get a wrong answer from Apache and cli. We build our PHP on these servers with the same options via emerge. The only difference is Apache 2. What the hell? # uname -a Linux proxy1 2.6.18-gentoo-r6 #1 SMP Thu Feb 8 07:32:31 EST 2007 x86_64 Dual-Core AMD Opteron(tm) Processor 2210 AuthenticAMD GNU/Linux # php foobar.php dir not a link same lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 access("/tmp/pear", F_OK) = 0 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 readlink("/tmp/link-test", "/tmp/pear", 4096) = 9 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 access("/tmp/pear", F_OK) = 0 unlink("/tmp/link-test") = 0 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/link-test", 0x7fff3f48fb70) = -1 ENOENT (No such file or directory) lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 symlink("/tmp/pear", "/tmp/link-test") = 0 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 readlink("/tmp/link-test", "/tmp/pear", 4096) = 9 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b906b634000 write(1, "dir", 3dir) = 3 write(1, "\n", 1 ) = 1 write(1, "not a link", 10not a link) = 10 write(1, "\n", 1 ) = 1 lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 lstat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(1, "same", 4same) = 4 32-bit Gentoo however acts as expected. $ uname -a Linux deadpool 2.6.11-gentoo-r6 #1 SMP Thu Apr 14 07:52:09 EDT 2005 i686 Intel(R) Xeon(TM) CPU 3.20GHz GenuineIntel GNU/Linux php test.php link link differ access("/tmp/pear", F_OK) = 0 access("/tmp/link-test", F_OK) = 0 unlink("/tmp/link-test") = 0 time(NULL) = 1179959743 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=14416, ...}) = 0 lstat64("/tmp/link-test", 0xbfff5e4c) = -1 ENOENT (No such file or directory) time(NULL) = 1179959743 lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=14416, ...}) = 0 lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0 symlink("/tmp/pear", "/tmp/link-test") = 0 lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb78b1000 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 write(1, "link", 4link) = 4 write(1, "\n", 1 ) = 1 stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0 write(1, "differ", 6differ) = 6 Rasmus Lerdorf wrote:
> lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 > lstat64("/tmp/link-test", 0xbff229ec) = -1 ENOENT (No such file or > directory) > lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 > lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > symlink("/tmp/pear", "/tmp/link-test") = 0 > lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 > write(1, "link", 4link) = 4 > write(1, "\n", 1 > ) = 1 > write(1, "link", 4link) = 4 > write(1, "\n", 1 > ) = 1 > stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > write(1, "differ", 6differ) = 6 > > > Scott MacVicar wrote: >> I'm getting similar results from a RHEL 4 box we have here, its running >> 5.2.3-dev. >> >> scott@scarlet [/tmp] # cat /etc/redhat-release >> Red Hat Enterprise Linux ES release 4 (Nahant Update 4) >> >> scott@scarlet [~] # uname -a >> Linux scarlet 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 >> i686 i686 i386 GNU/Linux >> >> scott@scarlet [/tmp] # php test.php >> dir >> not a link >> same >> >> strace for the during execution is. >> >> lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 >> lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 > > That means /tmp/link-test exists already, otherwise lstat returns -1. > Here is what I see if the link already exists when I run my script: > > access("/tmp/pear", F_OK) = 0 > access("/tmp/link-test", F_OK) = 0 > unlink("/tmp/link-test") = 0 > lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 > lstat64("/tmp/link-test", 0xbff229ec) = -1 ENOENT (No such file or > directory) > lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 > lstat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > symlink("/tmp/pear", "/tmp/link-test") = 0 > lstat64("/tmp/link-test", {st_mode=S_IFLNK|0777, st_size=9, ...}) = 0 > write(1, "link", 4link) = 4 > write(1, "\n", 1 > ) = 1 > write(1, "link", 4link) = 4 > write(1, "\n", 1 > ) = 1 > stat64("/tmp/pear", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 > write(1, "differ", 6differ) = 6 > > So did you leave out those access() calls, and did they fail, or did the > unlink() fail perhaps? > > -Rasmus >
-- Brian Moon Senior Developer ------------------------------ http://dealnews.com/ It's good to be cheap =)

Rasmus Lerdorf

19 years ago
Which filesystems is /tmp on on the various boxes? tmpfs related perhaps? -Rasmus Brian Moon wrote:

Brian Moon

19 years ago
Rasmus Lerdorf wrote:
> Which filesystems is /tmp on on the various boxes? tmpfs related perhaps?
On all my systems, /tmp is just part of / which is ReiserFS.
-- Brian Moon Senior Developer ------------------------------ http://dealnews.com/ It's good to be cheap =)

Arnold Daniels

19 years ago
Hi, Sorry I didn't react sooner. I was out of the office. I'm running ReiserFS as well. arnold@arnold-laptop:~$ mount /dev/sda3 on / type reiserfs (rw,notail) proc on /proc type proc (rw,noexec,nosuid,nodev) /sys on /sys type sysfs (rw,noexec,nosuid,nodev) varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755) varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) devshm on /dev/shm type tmpfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) lrm on /lib/modules/2.6.20-15-generic/volatile type tmpfs (rw) /dev/sda5 on /home type reiserfs (rw) /dev/sda6 on /xen-images type reiserfs (rw) nfsd on /proc/fs/nfsd type nfsd (rw) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) arnold@arnold-laptop:~$ apache2 -v Server version: Apache/2.2.3 Server built: Jan 15 2007 18:14:50 If I need to send anything else, please let me know. Best regards, Arnold Brian Moon wrote:

Tijnema !

19 years ago
On 5/24/07, Rasmus Lerdorf <rasmus@lerdorf.com> wrote:
> Which filesystems is /tmp on on the various boxes? tmpfs related perhaps? > > -Rasmus
Nice idea, but I don't think it's a problem there, I think it's a configuration problem. I've build my own linux, and so I have all configuration like I want. I'm running php-5.2.3RC1 as Apache 2.2.3 module. I've split up my USB stick in a few file systems, and they worked all for me, except for msdos&vfat file systems, as they don't support symlinks. Test results here: http://86.86.80.41/fs_test.php and source for the test is here: http://86.86.80.41/fs_test.phps Tijnema

Rasmus Lerdorf

19 years ago
Tijnema wrote:
> On 5/24/07, Rasmus Lerdorf <rasmus@lerdorf.com> wrote: >> Which filesystems is /tmp on on the various boxes? tmpfs related >> perhaps? >> >> -Rasmus > > Nice idea, but I don't think it's a problem there, I think it's a > configuration problem. I've build my own linux, and so I have all > configuration like I want. > I'm running php-5.2.3RC1 as Apache 2.2.3 module. > I've split up my USB stick in a few file systems, and they worked all > for me, except for msdos&vfat file systems, as they don't support > symlinks. > Test results here: > http://86.86.80.41/fs_test.php > and source for the test is here: > http://86.86.80.41/fs_test.phps
Mount options then perhaps? There is a "nosymlink" mount option which would certainly cause this. -Rasmus

Arnold Daniels

19 years ago
Hi again, No, the symlinks work fine in the shell and with all other applications. Also I haven't mounted with any options other than 'notail'. Please have a look at the e-mail I've send a few hours ago. arnold@arnold-laptop:~$ mount /dev/sda3 on / type reiserfs (rw,notail) ..... Best regards, Arnold Rasmus Lerdorf wrote:

Cristian Rodriguez

19 years ago
2007/5/23, Arnold Daniels <info@adaniels.nl>:
> Expected: > link > link > differ >
I get the "expected" result. with apache 2.2.3 and fastcgi in both 5.2.2 and current -dev , /tmp is mounted as a separate directory with "noatime" on a reiserfs filesystem.