[PHP-DEV] Bug #12256: Error tracking:pass the line number of the function call instead of fun.defin

2001-07-19 Thread sivasubraj

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Error tracking:pass the line number of the function call instead of 
fun.defin

?php

class numberHandler 
{
  function numberHandler ()
  {
  }
  
  function divide_by ($num, $div)
  {
// prova a rifiutare parametri incorretti


// this will cause an Error in case $div is zero
return $num/$div;


  }
};

// Some code

$n = new numberHandler();
print $n-divide_by(4,2) . \n; // ok
print $n-divide_by(4,0) . \n; // Here's the error
print numberHandler::divide_by(10,5) . \n;


/*
A Division by zero on line 13 error will be reported with the line number
from the inner of the class and there's no way of tracking the real
originator of the error.
How to make it possible to track the origin of the error, like in Java ?
Siva


Author: vincent 
Date:   2001-07-19 05:05:49

Ask the PHP boys to make their product give proper line numbers.\ 
 
The same happens when you give an incorrect number of parameters for a
function. The linenumber will indicate the function definition instead of
the line where you do the function call.

*/

?

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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11830: domxml_new_child should manage also xml docs

2001-07-02 Thread sivasubraj

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  domxml_new_child  should manage also xml docs

resource domxml_new_child (string name, string content)

it would be useful if the function handles also xml content, so that it's possible to 
incorporate a xml doc, without to have to dissasemble it 


-- 
Edit Bug report at: http://bugs.php.net/?id=11830edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9170: session_start() session_resume() session_create()

2001-02-08 Thread sivasubraj

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description:  session_start()  session_resume()  session_create()

WARNING: possible exploitation
When a client requests a PHPSESSID that doesn't exists on the server, session_start() 
creates one with the same SID. In this manner the client could write a SID of his 
choice, even a long one or a dangerous one. Or more commonly, an HTTP cache somewhere 
could send a previously used phpsessid but that was closed. 
If session_start() creates a (previously closed) phpsession with the same sid 
specified by the client, some ugly effects could happen. 

Please make a new function, session_resume() that tries to resume phpsession, but 
never to create new one. Viceversa, session_create() should be able only to create.

session_resume($sid) : return TRUE when the specified session exists and thus is 
correctly resumed, FALSE otherwise.
session_create($sid) : retun TRUE when a non-existent session is correctly created, 
FALSE otherwise

In this manner I could code in this manner: 

if (isset($HTTP_GET_VARS['session_id'])) {
 $sid = $HTTP_GET_VARS['session_id'])

} else if (isset($HTTP_POST_VARS['session_id'])) {
 $sid = $HTTP_POST_VARS['session_id'])

} else if (isset($HTTP_COOKIE_VARS['session_id'])) {
 $sid = $HTTP_COOKIE_VARS['session_id'])

};

if (isset($sid)) {  // the client requests to resume a session
 $ok = session_resume( $sid );
 if (!$ok) { 
  session_create(); // with a NEW random sid
 };  

} else {
 session_create();  

};

Alternatively, it would be nice if there is a new function, say session_nstart that 
resumes existent phpsession returning "resumed", otherwise creates a new session  
*with a different sid*, returning "new".

It is very important for me, thanks!
regards, siva


-- 
Edit Bug report at: http://bugs.php.net/?id=9170edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8855: session_start should return also FALSE

2001-01-23 Thread sivasubraj

From: [EMAIL PROTECTED]
Operating system: Linux Mandrake 7.2
PHP version:  4.0.4
PHP Bug Type: Feature/Change Request
Bug description:  session_start should return also FALSE 

I feel that the feature I am going to describe is desirable for security reasons: 
The function session_start should return FALSE when the GET (or cookie) requests to 
resume a non-esistent phpsession. 

If there is already a (quick) way to prevent resuming non-esistent or closed 
phpsessions, please let me know, else please, add the feature to the TODO list.
(I've set session_cache_limiter('private') and I *don't* want to set it to 'nocache').
Many thanks
Siva


-- 
Edit Bug report at: http://bugs.php.net/?id=8855edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]