ID: 20423 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Bogus +Status: Open Bug Type: Filesystem function related Operating System: Linux 2.4.x PHP Version: 4CVS-2002-11-14 New Comment:
to be more precise, the two links points to te same file only if you are in the same directory than the link which may be not the case ! Anyway , PHP do not have to interpret the relative path i give to transform it in an absolute path ! Previous Comments: ------------------------------------------------------------------------ [2002-11-14 09:03:12] [EMAIL PROTECTED] I do not agree with you, It is a bug and a very serious one ! I want to create my symlink with a relative path in order to be able to move then with the rest of my file tree , i do not want PHP to silently resolv the path ! previous version of PHP do not behave like this ! my application does not run with this version of PHP because of this problem, it is not possible with this version to create relative symlinks !!!! ------------------------------------------------------------------------ [2002-11-14 08:39:47] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The symlink ends up pointing to the same file, not a bug. If have 'foo2.txt -> ../foo.txt' and you do cat /tmp/foo2.txt the filesystem will resolve it to /foo.txt anyway. ------------------------------------------------------------------------ [2002-11-14 04:27:28] [EMAIL PROTECTED] try this little script : <script language="php"> chdir("/tmp"); @unlink("/tmp/foo2.txt"); symlink("../foo.txt", "/tmp/foo2.txt"); </script> it create on /tmp the following link : foo2.txt -> /foo.txt while it should have created ( as previous versions does ) foo2.txt -> ../foo.txt looks like relative path are resolved before making the link thus it is no longer possible to create relative links ! my configure line is : ./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --with-config-file-path=/etc --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db3 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext --with-jpeg-dir=/usr --with-openssl --with-png --with-regex=system --with-xml --with-zlib --with-layout=GNU --enable-debugger --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-oci8=shared --with-oracle=shared --with-imap=shared --with-imap-ssl --with-kerberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --enable-mbstring --enable-mbstr-enc-trans --with-apxs=/usr/sbin/apxs ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20423&edit=1
