#22235 [NEW]: build bundled gd2 fails - freetype related

2003-02-15 Thread fire
From: [EMAIL PROTECTED]
Operating system: windows 2000
PHP version:  4.3.0
PHP Bug Type: GD related
Bug description:  build bundled gd2 fails - freetype related

Hi, please dont jump if this is a freetype error ;) I would just like to
know.

4.3.0 (same with 4.3.1) building bundled GD fails at link freetype is 206
(renamed freetype206.lib to freetype2.lib) on MSVC6

not sure if the warnings are relavent?

Linking...
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in
MSVCRT.lib(MSVCRT.dll)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
MSVCRT.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
MSVCRT.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
MSVCRT.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
MSVCRT.lib(cinitexe.obj)
LIBC.lib(crt0dat.obj) : warning LNK4006: _exit already defined in
MSVCRT.lib(MSVCRT.dll); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored
LIBC.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in
MSVCRT.lib(cinitexe.obj); second definition ignored
   Creating library Release_TS/php_gd2.lib and object
Release_TS/php_gd2.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other
libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other
libs; use /NODEFAULTLIB:library
freetype2.lib(ftbase.obj) : error LNK2001: unresolved external symbol
_ft_debug_init
..\..\Release_TS/php_gd2.dll : fatal error LNK1120: 1 unresolved
externals
Error executing link.exe.
-- 
Edit bug report at http://bugs.php.net/?id=22235&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22235&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22235&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22235&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22235&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22235&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22235&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22235&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22235&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22235&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22235&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22235&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22235&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22235&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22235&r=gnused




#28388 [NEW]: different output for simple loop in 5.* vs 4.3.*

2004-05-13 Thread fire at firepages dot org
From: fire at firepages dot org
Operating system: win32 XP
PHP version:  5.0.0RC2
PHP Bug Type: Unknown/Other Function
Bug description:  different output for simple loop in 5.* vs 4.3.*

Description:

dunno how to describe , simply put the code below on 4.3.4 / 4.3.5  gives
(my) expected answer of '12'

on 5.0.0.b4 && RC2 the answer is '13' 
unsure which is the correct behaviour ;)

Reproduce code:
---
$word has $x characters in it."; 
?>

Expected result:

The word Encyclopedia has 12 characters in it.

Actual result:
--
The word Encyclopedia has 13 characters in it.

-- 
Edit bug report at http://bugs.php.net/?id=28388&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28388&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28388&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28388&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28388&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28388&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28388&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28388&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28388&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28388&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28388&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28388&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28388&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28388&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28388&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28388&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28388&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28388&r=float


#31216 [NEW]: array_merge_recursive change in behaviour php4>5

2004-12-20 Thread fire at firepages dot com dot au
From: fire at firepages dot com dot au
Operating system: win32 XP SP1
PHP version:  5.0.3
PHP Bug Type: Zend Engine 2 problem
Bug description:  array_merge_recursive change in behaviour php4>5

Description:

in php4 array_merge_recursive($arr1,$arr...) allowed the first array
argument to be unassigned , in php5 it requires inintialising.

perhaps php4 behaviour was a feature-bug ?



Reproduce code:
---
while( $whatever ){
  $arr = foo->get_arr();
  $tmp = array_merge_recursive( $tmp , $arr ) ;
}

Expected result:

$tmp is created if !exists & continues as expected

Actual result:
--
PHP-4.3.8 >> $tmp is created if !exists & continues as expected

PHP-5.0.3 Warning: array_merge_recursive() Argument #1 is not an array in


easily  `solved` by initialising $tmp prior to use $tmp=array(); just
unsure if this is intended ?

-- 
Edit bug report at http://bugs.php.net/?id=31216&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31216&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31216&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31216&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=31216&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=31216&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=31216&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=31216&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=31216&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31216&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=31216&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=31216&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=31216&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=31216&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31216&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=31216&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=31216&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31216&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31216&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=31216&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31216&r=mysqlcfg


#25874 [NEW]: var_export does not output valid code

2003-10-14 Thread fire at firepages dot com dot au
From: fire at firepages dot com dot au
Operating system: XP
PHP version:  4.3.3
PHP Bug Type: Variables related
Bug description:  var_export does not output valid code

Description:

output from var_export($var,true) has trailing comma so you have to strip
that manually before utilising the returned string.

the manual example shows this behaviour so perhaps its a feature ?

Reproduce code:
---
$yaks = array( 'dfdf'=>'a' , 'b' , 'c' , 'd' ) ;
echo '$llama = ' . var_export( $yaks , true ) . ' ;' ;

Expected result:

$llama = array ( 'dfdf' => 'a', 0 => 'b', 1 => 'c', 2 => 'd' ) ;

Actual result:
--
$llama = array ( 'dfdf' => 'a', 0 => 'b', 1 => 'c', 2 => 'd', ) ;

-- 
Edit bug report at http://bugs.php.net/?id=25874&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25874&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25874&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=25874&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=25874&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25874&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=25874&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=25874&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=25874&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=25874&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=25874&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=25874&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25874&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=25874&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=25874&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=25874&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25874&r=float


#25701 [Com]: Calling flush from within an output buffer prevents headers from being sent

2004-04-19 Thread webmaster at line-of-fire dot de
 ID:   25701
 Comment by:   webmaster at line-of-fire dot de
 Reported By:  scottmacvicar at ntlworld dot com
 Status:   Closed
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  4CVS
 Assigned To:  iliaa
 New Comment:

Hi,
I have a problem with the Gallery...

If i want to upload a picture, i became a error:

Warning: is_dir() [function.is-dir]: Stat failed for
modules/coppermine/albums/userpics/10002 (errno=13 - Permission denied)
in
/home/www/htdocs/nstudios.de/php/html/modules/coppermine/db_input.php
on line 236

Warning: mkdir(modules/coppermine/albums/userpics/10002)
[function.mkdir]: Permission denied in
/home/www/htdocs/nstudios.de/php/html/modules/coppermine/db_input.php
on line 237

Warning: is_dir() [function.is-dir]: Stat failed for
modules/coppermine/albums/userpics/10002 (errno=13 - Permission denied)
in
/home/www/htdocs/nstudios.de/php/html/modules/coppermine/db_input.php
on line 238

...
AND


Verzeichnis modules/coppermine/albums/userpics/10002 konnte nicht
angelegt werden! 

Datei:
/home/www/htdocs/nstudios.de/php/html/modules/coppermine/db_input.php -
Zeile: 238




I hope someone coud help me.

LoF


Previous Comments:


[2004-01-05 03:15:35] brion at pobox dot com

While this seems to be fixed when using --with-apxs2, 
the bug still occurs in 4.3.4 using --with-apxs2filter.

headers_sent() returns false, no warning or error 
message occurs when trying to use header(), just the 
headers silently vanish.



[2003-10-01 23:22:07] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-10-01 10:30:57] scottmacvicar at ntlworld dot com

';
}

echo $newtext;

?>

Based on what you've said above then you shouldn't see 'in here' within
Apache 2.



[2003-09-30 19:22:16] scottmacvicar at ntlworld dot com

Shouldn't headers_sent() return true then?



[2003-09-30 18:47:05] [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

Unlike Apache 1, when Apache 2 recieves a directive to flush it does so
right away sending any pending headers in the process. Since the
headers & text were already sent it cannot send the header indicating
the data that follows in gziped. Due to the missing header you get a
whole bunch of binary data.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/25701

-- 
Edit this bug report at http://bugs.php.net/?id=25701&edit=1


#47687 [NEW]: header("Location:") changing HTTP status

2009-03-17 Thread make dot fire at gmail dot com
From: make dot fire at gmail dot com
Operating system: windows server 2008
PHP version:  5.3CVS-2009-03-17 (snap)
PHP Bug Type: HTTP related
Bug description:  header("Location:") changing HTTP status

Description:

This bug is identical to bug #25044.

When setting the "Location" HTTP header using the header() function, PHP
automatically changes the HTTP response status to "302 Found", Whether
other status codes is already set or not.



Reproduce code:
---
file1.php:
http://www.php.net/";);
exit;
?>

file2.php:
http://www.php.net/";);
exit;
?>

Expected result:

HTTP Response:

file1.php:

HTTP/1.1 201 Created
Location: http://www.php.net/


file2.php:

HTTP/1.1 303 See Other
Location: http://www.php.net/


Actual result:
--
HTTP Response:

file1.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


file2.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


-- 
Edit bug report at http://bugs.php.net/?id=47687&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47687&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47687&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47687&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47687&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47687&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47687&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47687&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47687&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47687&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47687&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47687&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47687&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47687&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47687&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47687&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=47687&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=47687&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=47687&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=47687&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=47687&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=47687&r=mysqlcfg



#47687 [Opn]: header("Location:") changing HTTP status

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
 Status:   Open
 Bug Type: HTTP related
 Operating System: windows server 2008
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

And, the workaround in #25044 is not working,
the code:

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other');

or

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other', true, 303);

will result same response header:

HTTP/1.0 302 Found
Location: http://www.php.net/


Previous Comments:
----

[2009-03-17 09:54:21] make dot fire at gmail dot com

Description:

This bug is identical to bug #25044.

When setting the "Location" HTTP header using the header() function,
PHP automatically changes the HTTP response status to "302 Found",
Whether other status codes is already set or not.



Reproduce code:
---
file1.php:
http://www.php.net/";);
exit;
?>

file2.php:
http://www.php.net/";);
exit;
?>

Expected result:

HTTP Response:

file1.php:

HTTP/1.1 201 Created
Location: http://www.php.net/


file2.php:

HTTP/1.1 303 See Other
Location: http://www.php.net/


Actual result:
--
HTTP Response:

file1.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


file2.php:

HTTP/1.0 302 Found
Location: http://www.php.net/






-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Fbk->Opn]: header("Location:") changing HTTP status

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: HTTP related
-Operating System: windows server 2008
+Operating System: windows server vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

I try to use the lastest snapshots (PHP 5.3 (5.3.0beta2-dev),VC9 x86
Non Thread Safe (2009-Mar-17 13:00:00)),got the same result.

some infomation from phpinfo():
System: Windows NT  6.0 build 6001 (Windows Vista Ultimate Edition
Service Pack 1) i586
Build Date: Mar 17 2009 12:55:17
Compiler:   MSVC9 (Visual C++ 2008)
Architecture:   x86 
Server API: CGI/FastCGI 

CGI section:
Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  0   0
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.impersonate 1   1
fastcgi.logging 1   1

webserver is IIS7, PHP run in FastCGI mode(use php-cgi.exe).

I use HttpWatch to catch response header, 
when use code:

http://www.php.net/";);
exit;
?>

the status line in response is:

HTTP/1.1 302 Redirect

and when use code:



the status line in response is:

HTTP/1.1 303 See Other


Previous Comments:


[2009-03-17 11:03:24] j...@php.net

First of all, both of your examples work fine for me and produce the
expected results. You did not mention what web server you are using? And
exactly what PHP version are you using?



[2009-03-17 10:01:55] make dot fire at gmail dot com

And, the workaround in #25044 is not working,
the code:

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other');

or

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other', true, 303);

will result same response header:

HTTP/1.0 302 Found
Location: http://www.php.net/

----

[2009-03-17 09:54:21] make dot fire at gmail dot com

Description:

This bug is identical to bug #25044.

When setting the "Location" HTTP header using the header() function,
PHP automatically changes the HTTP response status to "302 Found",
Whether other status codes is already set or not.



Reproduce code:
---
file1.php:
http://www.php.net/";);
exit;
?>

file2.php:
http://www.php.net/";);
exit;
?>

Expected result:

HTTP Response:

file1.php:

HTTP/1.1 201 Created
Location: http://www.php.net/


file2.php:

HTTP/1.1 303 See Other
Location: http://www.php.net/


Actual result:
--
HTTP Response:

file1.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


file2.php:

HTTP/1.0 302 Found
Location: http://www.php.net/






-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Opn]: header("Location:") changing HTTP status

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
 Status:   Open
 Bug Type: HTTP related
 Operating System: windows server vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

When run php-cgi.exe in command line, the result is expected:

D:\project\www>php-cgi ./test.php
Status: 303 See Other
Location: http://www.php.net/
Content-type: text/html; charset=utf-8


test.php:
http://www.php.net/";);
exit;
?>

but visit same file throuth browser and webserver (use
http://localhost/test.php) will get 302 status code.


Previous Comments:


[2009-03-17 13:56:28] make dot fire at gmail dot com

I try to use the lastest snapshots (PHP 5.3 (5.3.0beta2-dev),VC9 x86
Non Thread Safe (2009-Mar-17 13:00:00)),got the same result.

some infomation from phpinfo():
System: Windows NT  6.0 build 6001 (Windows Vista Ultimate Edition
Service Pack 1) i586
Build Date: Mar 17 2009 12:55:17
Compiler:   MSVC9 (Visual C++ 2008)
Architecture:   x86 
Server API: CGI/FastCGI 

CGI section:
Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  0   0
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.impersonate 1   1
fastcgi.logging 1   1

webserver is IIS7, PHP run in FastCGI mode(use php-cgi.exe).

I use HttpWatch to catch response header, 
when use code:

http://www.php.net/";);
exit;
?>

the status line in response is:

HTTP/1.1 302 Redirect

and when use code:



the status line in response is:

HTTP/1.1 303 See Other



[2009-03-17 11:03:24] j...@php.net

First of all, both of your examples work fine for me and produce the
expected results. You did not mention what web server you are using? And
exactly what PHP version are you using?



[2009-03-17 10:01:55] make dot fire at gmail dot com

And, the workaround in #25044 is not working,
the code:

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other');

or

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other', true, 303);

will result same response header:

HTTP/1.0 302 Found
Location: http://www.php.net/

----

[2009-03-17 09:54:21] make dot fire at gmail dot com

Description:

This bug is identical to bug #25044.

When setting the "Location" HTTP header using the header() function,
PHP automatically changes the HTTP response status to "302 Found",
Whether other status codes is already set or not.



Reproduce code:
---
file1.php:
http://www.php.net/";);
exit;
?>

file2.php:
http://www.php.net/";);
exit;
?>

Expected result:

HTTP Response:

file1.php:

HTTP/1.1 201 Created
Location: http://www.php.net/


file2.php:

HTTP/1.1 303 See Other
Location: http://www.php.net/


Actual result:
--
HTTP Response:

file1.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


file2.php:

HTTP/1.0 302 Found
Location: http://www.php.net/






-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Opn]: header("Location:") changing HTTP status

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
 Status:   Open
 Bug Type: HTTP related
-Operating System: windows server vista
+Operating System: windows vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

when use this test code:
test.php:
http://www.php.net/";);
exit;
?>

use broswer to visit http://localhost/test.php, the status line in
response is:

HTTP/1.1 302 Redirect

and use php-cgi.exe under commend line get:

D:\project\www>php-cgi ./test.php
Status: 302 Moved Temporarily
Location: http://www.php.net/
Content-type: text/html; charset=utf-8


Previous Comments:


[2009-03-17 14:13:28] make dot fire at gmail dot com

When run php-cgi.exe in command line, the result is expected:

D:\project\www>php-cgi ./test.php
Status: 303 See Other
Location: http://www.php.net/
Content-type: text/html; charset=utf-8


test.php:
http://www.php.net/";);
exit;
?>

but visit same file throuth browser and webserver (use
http://localhost/test.php) will get 302 status code.



[2009-03-17 13:56:28] make dot fire at gmail dot com

I try to use the lastest snapshots (PHP 5.3 (5.3.0beta2-dev),VC9 x86
Non Thread Safe (2009-Mar-17 13:00:00)),got the same result.

some infomation from phpinfo():
System: Windows NT  6.0 build 6001 (Windows Vista Ultimate Edition
Service Pack 1) i586
Build Date: Mar 17 2009 12:55:17
Compiler:   MSVC9 (Visual C++ 2008)
Architecture:   x86 
Server API: CGI/FastCGI 

CGI section:
Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  0   0
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.impersonate 1   1
fastcgi.logging 1   1

webserver is IIS7, PHP run in FastCGI mode(use php-cgi.exe).

I use HttpWatch to catch response header, 
when use code:

http://www.php.net/";);
exit;
?>

the status line in response is:

HTTP/1.1 302 Redirect

and when use code:



the status line in response is:

HTTP/1.1 303 See Other



[2009-03-17 11:03:24] j...@php.net

First of all, both of your examples work fine for me and produce the
expected results. You did not mention what web server you are using? And
exactly what PHP version are you using?



[2009-03-17 10:01:55] make dot fire at gmail dot com

And, the workaround in #25044 is not working,
the code:

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other');

or

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other', true, 303);

will result same response header:

HTTP/1.0 302 Found
Location: http://www.php.net/

----

[2009-03-17 09:54:21] make dot fire at gmail dot com

Description:

This bug is identical to bug #25044.

When setting the "Location" HTTP header using the header() function,
PHP automatically changes the HTTP response status to "302 Found",
Whether other status codes is already set or not.



Reproduce code:
---
file1.php:
http://www.php.net/";);
exit;
?>

file2.php:
http://www.php.net/";);
exit;
?>

Expected result:

HTTP Response:

file1.php:

HTTP/1.1 201 Created
Location: http://www.php.net/


file2.php:

HTTP/1.1 303 See Other
Location: http://www.php.net/


Actual result:
--
HTTP Response:

file1.php:

HTTP/1.0 302 Found
Location: http://www.php.net/


file2.php:

HTTP/1.0 302 Found
Location: http://www.php.net/






-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Opn]: header("Location:") changing HTTP status in FCGI mode.

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
-Summary:  header("Location:") changing HTTP status
 Reported By:  make dot fire at gmail dot com
 Status:   Open
 Bug Type: HTTP related
 Operating System: windows vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

If change to ISAPI mode(use php5isapi.dll), the result is expected.

http://www.php.net/";);
exit;
?>

will got status line:

HTTP/1.1 303 See Other


Previous Comments:


[2009-03-17 14:24:29] make dot fire at gmail dot com

when use this test code:
test.php:
http://www.php.net/";);
exit;
?>

use broswer to visit http://localhost/test.php, the status line in
response is:

HTTP/1.1 302 Redirect

and use php-cgi.exe under commend line get:

D:\project\www>php-cgi ./test.php
Status: 302 Moved Temporarily
Location: http://www.php.net/
Content-type: text/html; charset=utf-8



[2009-03-17 14:13:28] make dot fire at gmail dot com

When run php-cgi.exe in command line, the result is expected:

D:\project\www>php-cgi ./test.php
Status: 303 See Other
Location: http://www.php.net/
Content-type: text/html; charset=utf-8


test.php:
http://www.php.net/";);
exit;
?>

but visit same file throuth browser and webserver (use
http://localhost/test.php) will get 302 status code.

----

[2009-03-17 13:56:28] make dot fire at gmail dot com

I try to use the lastest snapshots (PHP 5.3 (5.3.0beta2-dev),VC9 x86
Non Thread Safe (2009-Mar-17 13:00:00)),got the same result.

some infomation from phpinfo():
System: Windows NT  6.0 build 6001 (Windows Vista Ultimate Edition
Service Pack 1) i586
Build Date: Mar 17 2009 12:55:17
Compiler:   MSVC9 (Visual C++ 2008)
Architecture:   x86 
Server API: CGI/FastCGI 

CGI section:
Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  0   0
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.impersonate 1   1
fastcgi.logging 1   1

webserver is IIS7, PHP run in FastCGI mode(use php-cgi.exe).

I use HttpWatch to catch response header, 
when use code:

http://www.php.net/";);
exit;
?>

the status line in response is:

HTTP/1.1 302 Redirect

and when use code:



the status line in response is:

HTTP/1.1 303 See Other



[2009-03-17 11:03:24] j...@php.net

First of all, both of your examples work fine for me and produce the
expected results. You did not mention what web server you are using? And
exactly what PHP version are you using?

----

[2009-03-17 10:01:55] make dot fire at gmail dot com

And, the workaround in #25044 is not working,
the code:

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other');

or

header("Location: http://www.php.net/";);
header('HTTP/1.1 303 See Other', true, 303);

will result same response header:

HTTP/1.0 302 Found
Location: http://www.php.net/



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47687

-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Fbk->Opn]: header("Location:") changing HTTP status in FCGI mode.

2009-03-17 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: HTTP related
 Operating System: windows vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

I have tried using PHP 5.2 (5.2.10-dev), both VC6 x86 Non Thread Safe
(2009-Mar-18 00:00:00) and VC6 x86 Thread Safe (2009-Mar-18 00:00:00).
And have tried on windows vista and windows server 2008, got the same
results:

test code:

code1:
http://www.php.net/";);
exit;
?>

code2:


code3:
http://www.php.net/";);
exit;
?>

the problem only occurs when run php in fastCGI mode(using
php-cgi.exe). 
code1 produce status line:
HTTP/1.1 302 Redirect  (expected: HTTP/1.1 303 See Other)
code2 porduct status line:
HTTP/1.1 303 See Other (expected: HTTP/1.1 303 See Other)
code3 product status line:
HTTP/1.1 302 Redirect  (expected: HTTP/1.1 302 Moved Temporarily)


when run php in ISAPI mode(using php5isapi.dll) or run php-cgi.exe
under commend line, both test codes will produce expected result.

it seems that something wrong with header("Location: ") with CGI
mode...


Previous Comments:


[2009-03-17 21:11:42] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-03-17 14:30:46] make dot fire at gmail dot com

If change to ISAPI mode(use php5isapi.dll), the result is expected.

http://www.php.net/";);
exit;
?>

will got status line:

HTTP/1.1 303 See Other

----

[2009-03-17 14:24:29] make dot fire at gmail dot com

when use this test code:
test.php:
http://www.php.net/";);
exit;
?>

use broswer to visit http://localhost/test.php, the status line in
response is:

HTTP/1.1 302 Redirect

and use php-cgi.exe under commend line get:

D:\project\www>php-cgi ./test.php
Status: 302 Moved Temporarily
Location: http://www.php.net/
Content-type: text/html; charset=utf-8



[2009-03-17 14:13:28] make dot fire at gmail dot com

When run php-cgi.exe in command line, the result is expected:

D:\project\www>php-cgi ./test.php
Status: 303 See Other
Location: http://www.php.net/
Content-type: text/html; charset=utf-8


test.php:
http://www.php.net/";);
exit;
?>

but visit same file throuth browser and webserver (use
http://localhost/test.php) will get 302 status code.

----

[2009-03-17 13:56:28] make dot fire at gmail dot com

I try to use the lastest snapshots (PHP 5.3 (5.3.0beta2-dev),VC9 x86
Non Thread Safe (2009-Mar-17 13:00:00)),got the same result.

some infomation from phpinfo():
System: Windows NT  6.0 build 6001 (Windows Vista Ultimate Edition
Service Pack 1) i586
Build Date: Mar 17 2009 12:55:17
Compiler:   MSVC9 (Visual C++ 2008)
Architecture:   x86 
Server API: CGI/FastCGI 

CGI section:
Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  0   0
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.impersonate 1   1
fastcgi.logging 1   1

webserver is IIS7, PHP run in FastCGI mode(use php-cgi.exe).

I use HttpWatch to catch response header, 
when use code:

http://www.php.net/";);
exit;
?>

the status line in response is:

HTTP/1.1 302 Redirect

and when use code:



the status line in response is:

HTTP/1.1 303 See Other



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47687

-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1



#47687 [Fbk->Opn]: header("Location:") changing HTTP status in FCGI mode.

2009-03-23 Thread make dot fire at gmail dot com
 ID:   47687
 User updated by:  make dot fire at gmail dot com
 Reported By:  make dot fire at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: HTTP related
 Operating System: windows vista
 PHP Version:  5.3CVS-2009-03-17 (snap)
 New Comment:

yep, I think that you're right.
wait for M$ to fix it..


Previous Comments:


[2009-03-18 14:38:24] dmi...@php.net

The issue is probably caused by fastcgi module of web server. The PHP
sends proper headers, but it looks like fastcgi module sets status to
302 in case it finds "Location" header.



[2009-03-18 02:16:40] make dot fire at gmail dot com

I have tried using PHP 5.2 (5.2.10-dev), both VC6 x86 Non Thread Safe
(2009-Mar-18 00:00:00) and VC6 x86 Thread Safe (2009-Mar-18 00:00:00).
And have tried on windows vista and windows server 2008, got the same
results:

test code:

code1:
http://www.php.net/";);
exit;
?>

code2:


code3:
http://www.php.net/";);
exit;
?>

the problem only occurs when run php in fastCGI mode(using
php-cgi.exe). 
code1 produce status line:
HTTP/1.1 302 Redirect  (expected: HTTP/1.1 303 See Other)
code2 porduct status line:
HTTP/1.1 303 See Other (expected: HTTP/1.1 303 See Other)
code3 product status line:
HTTP/1.1 302 Redirect  (expected: HTTP/1.1 302 Moved Temporarily)


when run php in ISAPI mode(using php5isapi.dll) or run php-cgi.exe
under commend line, both test codes will produce expected result.

it seems that something wrong with header("Location: ") with CGI
mode...



[2009-03-17 21:11:42] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-03-17 14:30:46] make dot fire at gmail dot com

If change to ISAPI mode(use php5isapi.dll), the result is expected.

http://www.php.net/";);
exit;
?>

will got status line:

HTTP/1.1 303 See Other



[2009-03-17 14:24:29] make dot fire at gmail dot com

when use this test code:
test.php:
http://www.php.net/";);
exit;
?>

use broswer to visit http://localhost/test.php, the status line in
response is:

HTTP/1.1 302 Redirect

and use php-cgi.exe under commend line get:

D:\project\www>php-cgi ./test.php
Status: 302 Moved Temporarily
Location: http://www.php.net/
Content-type: text/html; charset=utf-8



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47687

-- 
Edit this bug report at http://bugs.php.net/?id=47687&edit=1