Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#42 closed defect (fixed)

conflict between sandbox and user error handler

Reported by: judas_iscariote Owned by: moo
Priority: major Milestone: 1.0.3
Component: cacher Version: 1.0.1
Keywords: error_handler class Cc: soporte+xcache@…
Application: PHP Version:
Other Exts: SAPI:
Probability: Blocked By:

Description (last modified by moo)

    error_reporting( E_ALL );
    set_error_handler( array( 'Reporter', 'report' ) );
    class Reporter {
        public static function report( $ReportID, $Message ) {
            echo "$ReportID:$Message";
    //can be any file that is not in the current directory.
    require_once( 'PEAR.php' );

Fatal error: Class 'Reporter' not found in /usr/share/pear/PEAR.php on line 563

same as eccelerator bug

Change History (6)

comment:1 Changed 14 years ago by moo

  • Description modified (diff)

comment:2 Changed 14 years ago by moo

  • Status changed from new to assigned

comment:3 Changed 14 years ago by moo

this is the same problem as "undefined constant" that caused by user-custom-handler + E_STRICT, and may not be relatived to the bug reported in eaccelerator. let's find a hack or wait the php guys fix it.

comment:4 Changed 14 years ago by judas_iscariote

but in the previous case --disable-xcache-constant workaround the problem however in this case the error persists ;-)

comment:5 Changed 14 years ago by moo

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Summary changed from problem with custom error handlers and require_once to conflict between sandbox and user error handler

yeah, --disable-xcache-constant move constant table outside of the sandbox protection, but we cannot do the same thing for class_table/function_table. to be or not to be ...

in trunk [209] [210], backpatched to 1.0.x in [211]

comment:6 Changed 14 years ago by moo

FYI: this fix is just a workarround by disabling user error handler for E_STRICT. E_STRICT is still issued, but user handler will not be called.

Note: See TracTickets for help on using tickets.