php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19688 session_write_close
Submitted: 2002-10-01 07:44 UTC Modified: 2002-10-01 11:42 UTC
From: peton at cavalex dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.3 OS: Linux 2.4.19
Private report: No CVE-ID: None
 [2002-10-01 07:44 UTC] peton at cavalex dot com
Hi,

  I think there is a buffer output problem. 
  It seems to me that when you close the 
  current session with session_write_close(), 
  the buffer output will be deleted (not sent, 
  it is destroyed).
  To add the flush() function, even following by
  with a sleep() just before the session_write_close
  doesn't not resolve this problem.

  Another point is the behaviour with IE and Mozilla,
  the output is incorrect the first time, and correct
  (not always) next times (usually you need to restart
  IE/Mozilla to reobtain the problem).
  But, with wget and telnet, the output is always
  incorrect.

  Regards,  

  Nicolas


Configuration:
  Linux : 2.4.19
  Server: Apache/1.3.26 (Unix) PHP/4.2.3

PHP : --enable-trans-sid=yes 


Always with :
   telnet localhost 80 [ GET /bug_session.php HTTP/1.0 ]
   wget http://localhost/bug_session.php

At the first execution of this script !!!
   IE 6.0 / XP
   Mozilla / XP


Script bug_session.php, 
Sorry if the script is a bit long, the problem occurs 
in line 198 (of the output), which is uncompleted 
with telnet/wget :

<BR>197:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BRXXXXX
<BR>199:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX

and completly deleted with IE/Mozilla

<BR>197:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX <BR>199:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX

--------------------------------------------
<?php
session_start();
?>
<BR>1:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>2:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>3:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>4:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>5:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>6:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>7:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>8:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>9:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>10:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>11:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>12:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>13:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>14:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>15:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>16:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>17:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>18:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>19:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>20:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>21:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>22:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>23:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>24:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>25:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>26:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>27:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>28:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>29:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>30:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>31:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>32:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>33:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>34:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>35:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>36:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>37:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>38:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>39:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>40:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>41:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>42:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>43:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>44:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>45:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>46:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>47:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>48:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>49:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>50:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>51:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>52:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>53:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>54:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>55:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>56:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>57:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>58:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>59:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>60:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>61:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>62:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>63:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>64:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>65:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>66:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>67:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>68:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>69:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>70:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>71:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>72:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>73:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>74:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>75:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>76:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>77:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>78:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>79:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>80:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>81:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>82:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>83:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>84:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>85:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>86:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>87:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>88:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>89:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>90:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>91:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>92:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>93:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>94:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>95:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>96:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>97:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>98:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>99:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>100:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>101:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>102:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>103:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>104:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>105:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>106:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>107:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>108:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>109:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>110:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>111:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>112:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>113:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>114:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>115:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>116:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>117:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>118:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>119:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>120:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>121:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>122:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>123:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>124:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>125:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>126:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>127:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>128:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>129:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>130:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>131:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>132:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>133:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>134:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>135:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>136:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>137:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>138:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>139:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>140:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>141:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>142:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>143:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>144:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>145:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>146:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>147:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>148:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>149:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>150:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>151:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>152:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>153:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>154:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>155:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>156:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>157:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>158:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>159:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>160:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>161:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>162:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>163:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>164:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>165:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>166:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>167:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>168:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>169:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>170:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>171:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>172:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>173:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>174:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>175:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>176:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>177:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>178:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>179:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>180:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>181:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>182:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>183:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>184:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>185:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>186:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>187:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>188:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>189:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>190:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>191:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>192:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>193:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>194:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>195:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>196:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>197:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>198:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>199:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>200:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>201:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>202:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<BR>203:A SMALL TEXT XXXXXXXXXXXXXXXXXXXXXX
<?
session_write_close();

echo "<BR>SEE LINE 198.\n";
echo "<BR>THE END.\n";
?>
-------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 10:36 UTC] yohgaki@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

It works for me.
 [2002-10-01 11:36 UTC] peton at cavalex dot com
Hi again,
 [2002-10-01 11:39 UTC] peton at cavalex dot com
Hi again,

  I just tested with PHP-4.3.0-cvs, there is no problem.

  Best regards,

  Nicolas
 [2002-10-01 11:42 UTC] iliaa@php.net
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.

user reports that the problem is no longer there in latest CVS, closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 15 02:01:31 2024 UTC