ID:               39144
 User updated by:  troelskn at gmail dot com
 Reported By:      troelskn at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         cURL related
 Operating System: windows xp
 PHP Version:      5.1.6
 New Comment:

Same.
You have to hit refresh a single time to trigger the error.


Previous Comments:
------------------------------------------------------------------------

[2006-10-13 10:26:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



------------------------------------------------------------------------

[2006-10-13 10:08:43] troelskn at gmail dot com

Description:
------------
Opening a curl session to non-existing file over the file:// protocol
corrupts php's session handler.

Reproduce code:
---------------
<?php
session_start();
$ch = curl_init("file://C:/filedoesntexist.txt");
if ($ch != NULL) {
  $data = curl_exec($ch);
  curl_close($ch);
}
session_write_close();
exit;

Expected result:
----------------
nothing

Actual result:
--------------
Warning: session_write_close() [function.session-write-close]: write
failed: Bad file descriptor (9) in C:\apache\htdocs\curltest.php on
line 8
Call Stack
#       Function        Location
1       {main}()        C:\apache\htdocs\curltest.php:0
2       session_write_close ()  C:\apache\htdocs\curltest.php:8

Warning: session_write_close() [function.session-write-close]: Failed
to write session data (files). Please verify that the current setting
of session.save_path is correct
(C:\Programmer\nusphere\phped\php5\sessions) in
C:\apache\htdocs\curltest.php on line 8
Call Stack
#       Function        Location
1       {main}()        C:\apache\htdocs\curltest.php:0
2       session_write_close ()  C:\apache\htdocs\curltest.php:8



------------------------------------------------------------------------


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

Reply via email to