#39144 [Opn->Fbk]: curl session non-existing file:// corrupts php session

From: Date: Fri, 13 Oct 2006 14:57:24 +0000
Subject: #39144 [Opn->Fbk]: curl session non-existing file:// corrupts php session
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103524@lists.php.net to get a copy of this message
ID: 39144 Updated by: tony2001@php.net Reported By: troelskn at gmail dot com -Status: Open +Status: Feedback Bug Type: cURL related Operating System: windows xp PHP Version: 5.1.6 New Comment: This code doesn't produce any errors here. In fact, it doesn't produce anything at all. Previous Comments: ------------------------------------------------------------------------ [2006-10-13 14:45:34] troelskn at gmail dot com Same. You have to hit refresh a single time to trigger the error. ------------------------------------------------------------------------ [2006-10-13 10:26:26] tony2001@php.net 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

« previous php.bugs (#103524) next »