[PHP-DEV] Error Handler

2002-11-18 Thread John Coggeshall


Did we ever come to some sort of agreement on the error handler thing? 

I'd like to maybe look into working on maybe putting together the
redirect-on-error system we discussed (implementing a new directive
which if set will re-direct the user to another web page if PHP errors
out).

Someone grunt in my direction in approval :)

John


|-Original Message-
|From: Marcus Börger [mailto:[EMAIL PROTECTED]] 
|Sent: Monday, November 18, 2002 10:53 PM
|To: Mike Leddy
|Cc: [EMAIL PROTECTED]
|Subject: Re: [PHP-DEV] Memory persistence with apache question
|
|
|Problems that could arise:
|The sytem tries to open images and does not unset the 
|variables...and such. I guess when everything is working you 
|cannot do anything against. If you want to investigate more 
|you would need a debug version from php to verify if all 
|memory is freed.
|
|But this is the post from the developer who is assigned to the bug on 
|Sourceforge:
|
| Date: 2002-10-23 17:59
| Sender: bharat
| Logged In: YES
| user_id=42211
| 
| This is fixed in v1.3.2
|
|marcus
|
|At 04:33 19.11.2002, Mike Leddy wrote:
|Hello,
|
|I administer a linux 2.4.19/apache 1.3.26/php 4.1.2 server in an ISP.
|
|Recently some clients started using a gallery php script: 
|http://gallery.sf.net
|
|that causes excessive memory utilization on the server: 
|http://sourceforge.net/tracker/index.php?func=detailaid=49802
|8group_i
|d=7130atid=107130
|
|So here goes the question:
|
|In what situations will memory allocated to a script remain with the 
|apache process after the script has terminated ?
|
|I always thought that memory allocated would be released on script 
|termination - Am I wrong in this assumption ?
|
|Could it be that the heap in the apache process stays at the 
|maximally 
|used level ?
|
|Thanks for any pointers or how I should approach resolving this 
|problem. (I am already using 'MaxRequestsPerChild 5' in apache as a 
|stopgap
|measure)
|
|Mike
|
|
|
|--
|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




RE: [PHP-DEV] error handler callback gets silenced errors

2002-04-09 Thread Marten Gustafsson

I think the current behaviour is fine. The user defined error handler should get 
silenced errors as well, then it?s up to the developer to decide wether to ignore them 
or not.



Marten.

 -Original Message-
 From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, March 31, 2002 12:15 PM
 To: Stig S. Bakken
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] error handler callback gets silenced errors
 
 
 Don't you think it's better to allow the user to decide inside 
 the handler 
 whether he wants to silence this error?  It makes custom error 
 loggers more 
 powerful, even if error_reporting is set to 0 in the php.ini file.
 I think that if we are to pay attention to EG(error_reporting) before we 
 call the custom error handler, we should conduct a full check 
 (i.e., is the 
 error level within the EG(error_reporting) mask), rather than have a 
 special check for EG(error_reporting)==0. I'm not sure how people feel 
 about that..?
 
 Zeev
 
 At 01:48 31/03/2002, Stig S. Bakken wrote:
 Hi,
 
 When using set_error_handler, my error handler function is called even
 when I silence errors.  IMHO that's just silly.  Proposing the following
 patch:
 
 Index: zend.c
 ===
 RCS file: /repository/Zend/zend.c,v
 retrieving revision 1.145
 diff -u -2 -b -B -w -u -r1.145 zend.c
 --- zend.c  26 Feb 2002 18:59:25 -  1.145
 +++ zend.c  30 Mar 2002 22:45:06 -
 @@ -639,4 +639,8 @@
  TSRMLS_FETCH();
 
 +/* Don't bother if we are not going to report anything anyway
 */
 +if (EG(error_reporting) == 0) {
 +return;
 +}
  /* Obtain relevant filename and lineno */
  switch (type) {
 
   - Stig
 
 
 --
 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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] error handler callback gets silenced errors

2002-03-31 Thread Stig S. Bakken

For now I do if (error_reporting() == 0) return; in my handler.  We
could just leave it like it is and properly document the fact that _all_
errors will be passed to the handler, with an example of how to detect
and ignore silenced errors.

 - Stig

On Sun, 2002-03-31 at 12:14, Zeev Suraski wrote:
 Don't you think it's better to allow the user to decide inside the handler 
 whether he wants to silence this error?  It makes custom error loggers more 
 powerful, even if error_reporting is set to 0 in the php.ini file.
 I think that if we are to pay attention to EG(error_reporting) before we 
 call the custom error handler, we should conduct a full check (i.e., is the 
 error level within the EG(error_reporting) mask), rather than have a 
 special check for EG(error_reporting)==0. I'm not sure how people feel 
 about that..?
 
 Zeev
 
 At 01:48 31/03/2002, Stig S. Bakken wrote:
 Hi,
 
 When using set_error_handler, my error handler function is called even
 when I silence errors.  IMHO that's just silly.  Proposing the following
 patch:
 
 Index: zend.c
 ===
 RCS file: /repository/Zend/zend.c,v
 retrieving revision 1.145
 diff -u -2 -b -B -w -u -r1.145 zend.c
 --- zend.c  26 Feb 2002 18:59:25 -  1.145
 +++ zend.c  30 Mar 2002 22:45:06 -
  -639,4 +639,8 
  TSRMLS_FETCH();
 
 +/* Don't bother if we are not going to report anything anyway
 */
 +if (EG(error_reporting) == 0) {
 +return;
 +}
  /* Obtain relevant filename and lineno */
  switch (type) {
 
   - Stig
 
 
 --
 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] error handler callback gets silenced errors

2002-03-30 Thread Stig S. Bakken

Hi,

When using set_error_handler, my error handler function is called even
when I silence errors.  IMHO that's just silly.  Proposing the following
patch:

Index: zend.c
===
RCS file: /repository/Zend/zend.c,v
retrieving revision 1.145
diff -u -2 -b -B -w -u -r1.145 zend.c
--- zend.c  26 Feb 2002 18:59:25 -  1.145
+++ zend.c  30 Mar 2002 22:45:06 -
 -639,4 +639,8 
TSRMLS_FETCH();
 
+/* Don't bother if we are not going to report anything anyway
*/
+if (EG(error_reporting) == 0) {
+return;
+}
/* Obtain relevant filename and lineno */
switch (type) {

 - Stig


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




Re: [PHP-DEV] error handler callback gets silenced errors

2002-03-30 Thread Zeev Suraski

Don't you think it's better to allow the user to decide inside the handler 
whether he wants to silence this error?  It makes custom error loggers more 
powerful, even if error_reporting is set to 0 in the php.ini file.
I think that if we are to pay attention to EG(error_reporting) before we 
call the custom error handler, we should conduct a full check (i.e., is the 
error level within the EG(error_reporting) mask), rather than have a 
special check for EG(error_reporting)==0. I'm not sure how people feel 
about that..?

Zeev

At 01:48 31/03/2002, Stig S. Bakken wrote:
Hi,

When using set_error_handler, my error handler function is called even
when I silence errors.  IMHO that's just silly.  Proposing the following
patch:

Index: zend.c
===
RCS file: /repository/Zend/zend.c,v
retrieving revision 1.145
diff -u -2 -b -B -w -u -r1.145 zend.c
--- zend.c  26 Feb 2002 18:59:25 -  1.145
+++ zend.c  30 Mar 2002 22:45:06 -
 -639,4 +639,8 
 TSRMLS_FETCH();

+/* Don't bother if we are not going to report anything anyway
*/
+if (EG(error_reporting) == 0) {
+return;
+}
 /* Obtain relevant filename and lineno */
 switch (type) {

  - Stig


--
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