Re: [PHP-DEV] Patch for bug #20539

2002-11-28 Thread Sascha Schumann
On Thu, 28 Nov 2002, Edin Kadribasic wrote:

> Forget the patch, its not working well. The problem is that with
> session autostart SID constant gets defined in rinit and gets
> destroyed twice.

Yes, that's why I don't like to rely on internals of
something which should be a black box.  The constants
API needs an interface for deleting entries.

- Sascha

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Patch for bug #20539

2002-11-28 Thread Edin Kadribasic
Forget the patch, its not working well. The problem is that with
session autostart SID constant gets defined in rinit and gets
destroyed twice.

Edin

- Original Message -
From: "Edin Kadribasic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 28, 2002 2:11 PM
Subject: [PHP-DEV] Patch for bug #20539


> Hi Sascha,
>
> The attached patch fixes a crash in CLI when php.ini contains:
>
> session.auto_start=1
> magic_quotes_gpc=1
>
> Could you please review it?
>
> Edin
>
>






> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Patch for bug #20539

2002-11-28 Thread Edin Kadribasic
Hi Sascha,

The attached patch fixes a crash in CLI when php.ini contains:

session.auto_start=1
magic_quotes_gpc=1

Could you please review it?

Edin


Index: session.c
===
RCS file: /repository/php4/ext/session/session.c,v
retrieving revision 1.336.2.1
diff -u -3 -p -r1.336.2.1 session.c
--- session.c   20 Nov 2002 17:49:57 -  1.336.2.1
+++ session.c   28 Nov 2002 13:06:46 -
@@ -1031,7 +1031,8 @@ PHPAPI void php_session_start(TSRMLS_D)
smart_str_appendc(&var, '=');
smart_str_appends(&var, PS(id));
smart_str_0(&var);
-   REGISTER_STRINGL_CONSTANT("SID", var.c, var.len, 0);
+   REGISTER_STRINGL_CONSTANT("SID", var.c, var.len, CONST_PERSISTENT | 
+CONST_CS); 
+   smart_str_free(&var);
} else {
REGISTER_STRINGL_CONSTANT("SID", empty_string, 0, 0);
}

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php