php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13083 FOPEN does not handle redirects
Submitted: 2001-08-31 13:41 UTC Modified: 2001-10-15 19:32 UTC
From: procacci at procacci dot net Assigned:
Status: Closed Package: *URL Functions
PHP Version: 4.0.6 OS: FreeBSD 4.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: procacci at procacci dot net
New email:
PHP Version: OS:

 

 [2001-08-31 13:41 UTC] procacci at procacci dot net
fopen does not handle redirecting URL.

For example:

"http://www.xanthus.net"  redirects to "http://www.xanthus.net/Current".
$fopen = fopen("http://www.xanthus.net", "r"); // Does not work

$fopen = fopen("http://www.xanthus.net/Current", "r"); //Does work

This first example redirects to the second examples URL.
I was using php Version 4.0.6, but upgraded to PHP Version 4.0.8-dev hoping this would solve the problem.

Here's my configure script options:
 './configure' '--with-mysql' '--with-gd=/usr/local/' '--with-pgsql'
                         '--enable-inline-optimization' '--with-apxs' '--enable-versioning' '--with-gettext'

Here's an strace output when running via a command line:  strace ./tmp.tmp

execve("./tmp.tmp", ["./tmp.tmp"], [/* 17 vars */]) = 0
__sysctl([hw.pagesize], 2, "\0\20\0\0", [4], NULL, 0) = 0
mmap(0, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0x2813e000
geteuid(0xbfbffbe8)                     = 0
getuid()                                = 0 (euid 0)
getegid(0xbfbffbe8)                     = 0
getgid()                                = 0 (egid 0)
open("/var/run/ld-elf.so.hints", O_RDONLY) = 3
read(3, "Ehnt\1\0\0\0\200\0\0\0a\0\0\0\0\0\0\0`\0\0\0\0\0\0\0\0"..., 128) = 128
lseek(3, 128, SEEK_SET)                 = 128
read(3, "/usr/lib:/usr/lib/compat:/usr/X1"..., 97) = 97
close(3)                                = 0
access("/usr/lib/libpam.so.1", F_OK)    = 0
open("/usr/lib/libpam.so.1", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=34588, ...}) = 0
read(3, "\177ELF\1\1\1\tFreeBSD\0\3\0\3\0\1\0\0\0\344\30\0\0004"..., 4096) = 4096
mmap(0, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x28146000
mmap(0x2814e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x2814e000
close(3)                                = 0
access("/usr/lib/libcrypt.so.2", F_OK)  = 0
open("/usr/lib/libcrypt.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=11680, ...}) = 0
read(3, "\177ELF\1\1\1\tFreeBSD\0\3\0\3\0\1\0\0\0\304\7\0\0004\0"..., 4096) = 4096
mmap(0, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2814f000
mmap(0x28152000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x28152000
mmap(0x28153000, 69632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0x28153000
close(3)                                = 0
access("/usr/lib/libm.so.2", F_OK)      = 0
open("/usr/lib/libm.so.2", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=118928, ...}) = 0
read(3, "\177ELF\1\1\1\tFreeBSD\0\3\0\3\0\1\0\0\0\2302\0\0004\0"..., 4096) = 4096
mmap(0, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x28164000
mmap(0x2817b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x16000) = 0x2817b000
close(3)                                = 0
access("/usr/lib/libc.so.4", F_OK)      = 0
open("/usr/lib/libc.so.4", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=561580, ...}) = 0
read(3, "\177ELF\1\1\1\tFreeBSD\0\3\0\3\0\1\0\0\0\274*\1\0004\0"..., 4096) = 4096
mmap(0, 614400, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2817f000
mmap(0x281fc000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7c000) = 0x281fc000
mmap(0x28201000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0x28201000
close(3)                                = 0
sigaction(SIGILL, {0x2812f084, [], 0}, {SIG_DFL}) = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigaction(SIGILL, {SIG_DFL}, NULL)      = 0
sigprocmask(SIG_BLOCK, ~[ILL TRAP ABRT EMT FPE BUS SEGV SYS], []) = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}) = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
readlink("/etc/malloc.conf", 0xbfbff9b0, 63) = -1 ENOENT (No such file or directory)
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0x28215000
break(0x814b000)                        = 0
break(0x814c000)                        = 0
break(0x814d000)                        = 0
break(0x814e000)                        = 0
break(0x814f000)                        = 0
break(0x8150000)                        = 0
break(0x8151000)                        = 0
open("./php.ini", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("/usr/local/lib/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
break(0x8152000)                        = 0
break(0x8153000)                        = 0
break(0x8154000)                        = 0
break(0x8155000)                        = 0
break(0x8156000)                        = 0
break(0x8157000)                        = 0
break(0x8158000)                        = 0
break(0x8159000)                        = 0
break(0x815a000)                        = 0
break(0x815b000)                        = 0
break(0x815c000)                        = 0
break(0x815d000)                        = 0
break(0x815e000)                        = 0
break(0x815f000)                        = 0
break(0x8160000)                        = 0
break(0x8161000)                        = 0
break(0x8162000)                        = 0
break(0x8163000)                        = 0
break(0x8164000)                        = 0
break(0x8165000)                        = 0
break(0x8166000)                        = 0
break(0x8167000)                        = 0
break(0x8168000)                        = 0
break(0x8169000)                        = 0
break(0x816a000)                        = 0
break(0x816b000)                        = 0
break(0x816c000)                        = 0
break(0x816d000)                        = 0
break(0x816e000)                        = 0
open("/etc/protocols", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5770, ...}) = 0
break(0x8170000)                        = 0
read(3, "#\n# Internet protocols\n#\n# $Free"..., 8192) = 5770
close(3)                                = 0
open("/etc/protocols", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5770, ...}) = 0
read(3, "#\n# Internet protocols\n#\n# $Free"..., 8192) = 5770
close(3)                                = 0
break(0x8171000)                        = 0
break(0x8172000)                        = 0
open("/etc/services", O_RDONLY)         = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=72301, ...}) = 0
break(0x8174000)                        = 0
read(3, "#\n# Network services, Internet s"..., 8192) = 8192
read(3, "TSAP Class 0\niso-tsap\t102/udp\t  "..., 8192) = 8192
read(3, "ing\t\t\nat-3\t\t203/tcp\t   #AppleTal"..., 8192) = 8192
read(3, "s\nups\t\t401/tcp\t   #Uninterruptib"..., 8192) = 8192
read(3, "in\t534/udp\t   #MegaMedia Admin\ni"..., 8192) = 8192
read(3, "tl_bootc\t1068/tcp   #Installatio"..., 8192) = 8192
read(3, "\t\t1429/tcp   #Hypercom NMS\t\t    "..., 8192) = 8192
read(3, "\t1534/udp\nampr-info\t1535/tcp\namp"..., 8192) = 8192
read(3, "33/udp   #DEC Notes\nrsvp-encap\t3"..., 8192) = 6765
read(3, "", 8192)                       = 0
close(3)                                = 0
break(0x8175000)                        = 0
break(0x8176000)                        = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30, 0}}, NULL) = 0
sigaction(SIGPROF, {0x80c84c4, [], SA_RESTART}, {SIG_DFL}) = 0
sigprocmask(SIG_UNBLOCK, [PROF], NULL)  = 0
break(0x8177000)                        = 0
break(0x8178000)                        = 0
break(0x8179000)                        = 0
gettimeofday({999280505, 782090}, NULL) = 0
getpid()                                = 27412 (ppid 27411)
getpid()                                = 27412 (ppid 27411)
open("./tmp.tmp", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1961, ...}) = 0
chdir(".")                              = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1961, ...}) = 0
break(0x817b000)                        = 0
read(3, "#!/usr/local/bin/php -q\n<?php\n\n/"..., 8192) = 1961
sigprocmask(SIG_BLOCK, NULL, [])        = 0
break(0x8180000)                        = 0
ioctl(3, TIOCGETA, 0xbfbfe948)          = -1 ENOTTY (Inappropriate ioctl for device)
break(0x8181000)                        = 0
read(3, "", 8192)                       = 0
break(0x8182000)                        = 0
break(0x8186000)                        = 0
break(0x8196000)                        = 0
ioctl(3, TIOCGETA, 0xbfbfd994)          = -1 ENOTTY (Inappropriate ioctl for device)
break(0x819b000)                        = 0
close(3)                                = 0
gettimeofday({999280505, 790040}, NULL) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(5, 3), ...}) = 0
ioctl(1, TIOCGETA, {B9600 opost isig icanon echo ...}) = 0
write(1, "<br>\n", 5<br>
)                   = 5
write(1, "<b>Warning</b>:  Cannot send ses"..., 108<b>Warning</b>:  Cannot send session cookie - headers already sent in <b>./tmp.tmp</b> on line <b>5</b><br>
) = 108
write(1, "<br>\n", 5<br>
)                   = 5
write(1, "<b>Warning</b>:  Cannot send ses"..., 147<b>Warning</b>:  Cannot send session cache limiter - headers already sent (output started at ./tmp.tmp:5) in <b>./tmp.tmp</b> on line <b>5</b><br>
) = 147
open("/tmp/sess_29d5f30bc92aebe0054e94cce089a4e0", O_RDWR) = -1 ENOENT (No such file or directory)
open("/tmp/sess_29d5f30bc92aebe0054e94cce089a4e0", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
flock(3, LOCK_EX)                       = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "", 0)                          = 0
gettimeofday({999280505, 809447}, NULL) = 0
open("/etc/host.conf", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=205, ...}) = 0
read(4, "# $FreeBSD: src/etc/host.conf,v "..., 8192) = 205
read(4, "", 8192)                       = 0
close(4)                                = 0
open("/etc/hosts", O_RDONLY)            = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1153, ...}) = 0
read(4, "# $FreeBSD: src/etc/hosts,v 1.11"..., 8192) = 1153
read(4, "", 8192)                       = 0
close(4)                                = 0
gettimeofday({999280505, 813954}, NULL) = 0
getpid()                                = 27412 (ppid 27411)
issetugid(0x281ffea8)                   = 0
open("/etc/resolv.conf", O_RDONLY)      = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=47, ...}) = 0
read(4, "domain\txanthusinc.com\nnameserver"..., 8192) = 47
read(4, "", 8192)                       = 0
close(4)                                = 0
issetugid(0x281ffea8)                   = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\360\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\34"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf9f40, 0x1, 0xbfbf9f40, 0x1, 0xbfbf9f2c) = 1
recvfrom(5, "\317\360\201\200\0\1\0\0\0\1\0\0\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 83
close(5)                                = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\361\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\1\0"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf9f40, 0x1, 0xbfbf9f40, 0x1, 0xbfbf9f2c) = 1
recvfrom(5, "\317\361\201\200\0\1\0\1\0\2\0\2\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 116
close(5)                                = 0
close(4)                                = 0
open("/etc/hosts", O_RDONLY)            = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1153, ...}) = 0
read(4, "# $FreeBSD: src/etc/hosts,v 1.11"..., 8192) = 1153
read(4, "", 8192)                       = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\362\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\34"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf9f40, 0x1, 0xbfbf9f40, 0x1, 0xbfbf9f2c) = 1
recvfrom(5, "\317\362\201\200\0\1\0\0\0\1\0\0\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 83
close(5)                                = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\363\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\1\0"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf9f40, 0x1, 0xbfbf9f40, 0x1, 0xbfbf9f2c) = 1
recvfrom(5, "\317\363\201\200\0\1\0\1\0\2\0\2\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 116
close(5)                                = 0
close(4)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
connect(4, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("216.121.96.201")}}, 16) = 0
sendto(4, "GET /Current HTTP/1.0\r\n", 23, 0, NULL, 0) = 23
sendto(4, "Host: www.xanthus.net\r\n", 23, 0, NULL, 0) = 23
sendto(4, "User-Agent: PHP/4.0.6\r\n\r\n", 25, 0, NULL, 0) = 25
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
recvfrom(4, "HTTP/1.1 301 Moved Permanently\r\n"..., 8192, 0, NULL, NULL) = 485
shutdown(4, 0 /* receive */)            = 0
close(4)                                = 0
open("/etc/hosts", O_RDONLY)            = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1153, ...}) = 0
read(4, "# $FreeBSD: src/etc/hosts,v 1.11"..., 8192) = 1153
read(4, "", 8192)                       = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\364\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\34"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf7c40, 0x1, 0xbfbf7c40, 0x1, 0xbfbf7c2c) = 1
recvfrom(5, "\317\364\201\200\0\1\0\0\0\1\0\0\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 83
close(5)                                = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\365\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\1\0"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf7c40, 0x1, 0xbfbf7c40, 0x1, 0xbfbf7c2c) = 1
recvfrom(5, "\317\365\201\200\0\1\0\1\0\2\0\2\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 116
close(5)                                = 0
close(4)                                = 0
open("/etc/hosts", O_RDONLY)            = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1153, ...}) = 0
read(4, "# $FreeBSD: src/etc/hosts,v 1.11"..., 8192) = 1153
read(4, "", 8192)                       = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\366\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\34"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf7c40, 0x1, 0xbfbf7c40, 0x1, 0xbfbf7c2c) = 1
recvfrom(5, "\317\366\201\200\0\1\0\0\0\1\0\0\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 83
close(5)                                = 0
close(4)                                = 0
kqueue(0x281ffea8)                      = 4
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
connect(5, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, 16) = 0
sendto(5, "\317\367\1\0\0\1\0\0\0\0\0\0\3www\7xanthus\3net\0\0\1\0"..., 33, 0, NULL, 0) = 33
kevent(0x4, 0xbfbf7c40, 0x1, 0xbfbf7c40, 0x1, 0xbfbf7c2c) = 1
recvfrom(5, "\317\367\201\200\0\1\0\1\0\2\0\2\3www\7xanthus\3net\0\0"..., 1024, 0, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("209.191.146.3")}}, [16]) = 116
close(5)                                = 0
close(4)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
connect(4, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("216.121.96.201")}}, 16) = 0
sendto(4, "GET /Current/ HTTP/1.0\r\n", 24, 0, NULL, 0) = 24
sendto(4, "Host: www.xanthus.net\r\n", 23, 0, NULL, 0) = 23
sendto(4, "User-Agent: PHP/4.0.6\r\n\r\n", 25, 0, NULL, 0) = 25
select(5, [4], NULL, NULL, NULL)        = 1 (in [4])
recvfrom(4, "HTTP/1.1 200 OK\r\nDate: Fri, 31 A"..., 8192, 0, NULL, NULL) = 1460
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
ftruncate(3, 0)                         = 0
lseek(3, 0, SEEK_SET)                   = 0
write(3, "", 0)                         = 0
close(3)                                = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
shutdown(4, 0 /* receive */)            = 0
close(4)                                = 0
shutdown(4, 0 /* receive */)            = -1 EBADF (Bad file descriptor)
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
write(1, "It worked", 9It worked)                = 9
sigprocmask(SIG_BLOCK, NULL, [])        = 0
break(0x8192000)                        = 0
break(0x8191000)                        = 0
sigprocmask(SIG_BLOCK, NULL, [])        = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
sigprocmask(SIG_BLOCK, ~[ILL TRAP ABRT EMT FPE BUS SEGV SYS], []) = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
exit(0)                                 = ?



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-31 13:53 UTC] sander@php.net
Reproduced with 4.0.6 on Win2K.

It seems that fopen can only handle trailing-slash redirects on directories.

Example:
fopen("http://www.domain.com/some_dir", "r");
works, you're redirected to http://www.domain.com/some_dir/ but
fopen("http://www.php.net/fopen", "r"); 
does NOT work, you're NOT redirected to http://www.php.net/manual/en/function.fopen.php
 [2001-08-31 13:56 UTC] sander@php.net
And please don't include a strace unless somebody asks for it. See http://www.php.net/bugs-dos-and-donts.php for more information.
 [2001-10-13 22:09 UTC] sniper@php.net
Reproduce also with 4.0.8-dev on Linux.

--Jani

 [2001-10-15 19:32 UTC] edink@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 15:01:27 2025 UTC