Newsgroups: php.general,php.internals Path: news.php.net Xref: news.php.net php.general:325731 php.internals:95922 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68074 invoked from network); 12 Sep 2016 04:22:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2016 04:22:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=rene.veerman.netherlands@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rene.veerman.netherlands@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: rene.veerman.netherlands@gmail.com X-Host-Fingerprint: 209.85.220.172 mail-qk0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:33131] helo=mail-qk0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/31-58405-96D26D75 for ; Mon, 12 Sep 2016 00:22:02 -0400 Received: by mail-qk0-f172.google.com with SMTP id w204so131599652qka.0; Sun, 11 Sep 2016 21:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=EzFwRVHX0TIX0+z/Al1yLkc2GyAjrVPAQf2S3uCwxXI=; b=Q2KZO72P2x+JJcoUPDb/GFAnts4hprmHoJ56fCvHiT+JUuTABJhHFQf79UGhwH1X/O 0b4TH7LjmZgm0YyjeIQmi7IlYQb3fwg57bhBwseva61dSoLQxLr2a7qZ/b7mdtDvSAqy h0rft72fRahaQkUd2y+XzvUpCvcEoiGidOUK6+y/d85UD0zjHsQ8OoLihnGIgSDMMi/L X6INseBQUtNBDV3X5QgQuQex0J27Dj2h17RfNlQS1tEkJW2zx4UWDOqOARo5+NrBiAkd Bvv9mOpwq1FYmXvYJ0ua/v9MmkXyZUTvPPzV+g/fH6WSMaWwXHd1ivmv6iylbLVQ+o6t mdqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=EzFwRVHX0TIX0+z/Al1yLkc2GyAjrVPAQf2S3uCwxXI=; b=Fc2eM1KiF/5ZnDytY4y93eL48ZHHcCjDPOSEJR+kZmGlTZZqXWj02AYxDIcJfoZW+T UsEM92dQ3VerkT01/bD356Qa9QxDa0sIk1aehuKSweVp85TAlmilEoFoc4EEUOdtfLSS RNm36KwCvhR3wOx2mHEmALeXuTjTHyT5nmAR5Zjk3oW/W/Y5ZQLR8Bxhp/tD/nOpEGPq QGR7qz1bU5osCRwmBSlBGvDFSHiTmzNuAVvYxyOb6zOv7GhD9gNBKfWsozF0bstLF0OG LZ6IkYdG+yCIkL/+qBgG5d1uKmrib/qjo3oFf0tFpkog38svom4el93QOibkTvu8CFmu joUw== X-Gm-Message-State: AE9vXwMiFBWENrfrrca8x8bVAPtMextvOqOpIma30qTZASxa5nTcGBxllL9B9cKc29bX9p1CzR2mXX5YWfpBhw== X-Received: by 10.55.169.134 with SMTP id s128mr17292267qke.32.1473654118879; Sun, 11 Sep 2016 21:21:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.52.46 with HTTP; Sun, 11 Sep 2016 21:21:38 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Sep 2016 06:21:38 +0200 Message-ID: To: Omega -1911 <1911que@gmail.com>, php-general@lists.php.net, Internals Content-Type: multipart/alternative; boundary=94eb2c06f45c4740f4053c47d615 Subject: Re: [PHP] Re: feature-request : html + css logging in apache logs (example for the rest of the unix community too) From: rene.veerman.netherlands@gmail.com (Rene Veerman) --94eb2c06f45c4740f4053c47d615 Content-Type: text/plain; charset=UTF-8 hey guys i've been working on my PHP error handling sources again recently, and i found that a tail -f /var/log/[apache2-error.log] is very easy to show in a terminal window.. since i now have enough time to consider the operating-system layer of apache logging, i think i can let go of this feature request. with a bit of effort, i can read in an apache log and add html-colorize it myself. and not putting the burden on the people who make the tools that i get to use for free, is almost always the better option.. see https://github.com/seductiveapps and https://facebook.com/ReneVeermanSeductiveApps and https://facebook.com/SeductiveAppsAcademy for the progress reports. thanks again for your efforts :) and with regards i go back into silent mode, Rene AJM Veerman CEO + CTO of seductiveapps.com (which currently only works in the Firefox and Chrome browsers and has broken website features, because i'm upgrading my source-encryptor (source-obfuscator) https://github.com/seductiveapps/webappObfuscator On Sun, Aug 28, 2016 at 7:14 AM, Omega -1911 <1911que@gmail.com> wrote: > well end users will likely *try* to use your "secure" method on a server > at some point and it is obvious that in the future, everyone will have > servers at home, NOT connected to the Internet, right? -Wait, this is 2016 > and the "cloud" has been hacked... said Apple, Microsoft and a TON of cloud > hosting providers ;) Wink, wink. > > On Sun, Aug 28, 2016 at 1:08 AM, Rene Veerman gmail.com> wrote: > >> i run my server at home dude :) and offload the 3MB that is my animated >> button to a cloud hosting thing like imgup.net for instance :) >> >> On Sun, Aug 28, 2016 at 7:05 AM, Omega -1911 <1911que@gmail.com> wrote: >> >>> Seriously? You think you will be able to hide code when all along, you >>> do understand that since the code is not "compiled", it still has to be >>> "interpreted" at run time... Meaning that anyone on that server can snatch >>> the source. >>> >>> On Sun, Aug 28, 2016 at 12:57 AM, Rene Veerman < >>> rene.veerman.netherlands@gmail.com> wrote: >>> >>>> ---------- Forwarded message ---------- >>>> From: Rene Veerman >>>> Date: Sun, Aug 28, 2016 at 6:55 AM >>>> Subject: announcing public release of jsonViewer and saJSON >>>> To: php-general@lists.php.net, Internals >>>> >>>> >>>> i'm gonna re-opensource these in the future anyhow for that update to >>>> the >>>> PHP error handling, so i thought it would be nice to release what i got >>>> now >>>> (should work, may need a tiny bit of work by you).. >>>> >>>> perhaps *you* can include it in the following package{3}? nice challenge >>>> perhaps..? :) >>>> >>>> https://github.com/seductiveapps/webappObfuscator/blob/ >>>> master/webappObfuscator-1.0.0/functions__basicErrorHandling.php >>>> https://github.com/seductiveapps/webappObfuscator/blob/ >>>> master/webappObfuscator-1.0.0/1.0.0/functions.php >>>> https://github.com/seductiveapps/webappObfuscator/blob/ >>>> master/webappObfuscator-1.0.0/functions__internalErrorHandling.php >>>> light background css : https://github.com/seductive >>>> apps/webappObfuscator/blob/master/webappObfuscator-1.0.0/ >>>> webappObfuscator-1.0.0__ajax.css >>>> dark background css : https://github.com/seductive >>>> apps/webappObfuscator/blob/master/webappObfuscator-1.0.0/ >>>> webappObfuscator-1.0.0.css >>>> >>>> >>>> jsonViewer provides : >>>> - a pure-PHP encoder for JSON that can handle JSON in the range of at >>>> least >>>> 100MB to maybe 1GB or more (provided you provide enough RAM ofcourse) >>>> - JS that outputs HTML that actually can view such large arrays, tested >>>> with sample JSON file[1] of 100MB in 2013 >>>> - runs in all browsers, smartphones iPhone6+ and Android 4.2+ too >>>> - initially fully-collapsed view of your data showing just the root keys >>>> - ability to open keys by clicking on them, or up to the required depth >>>> (opening-links for all up to the max depth too) >>>> - pretty colors, auto-generated from easy templates ( >>>> https://github.com/ >>>> seductiveapps/saColorGradients >>>> ) >>>> - a bunch of other convenient and if i may say so myself, technically >>>> impressive features >>>> >>>> URLs >>>> >>>> https://github.com/seductiveapps/jsonViewer >>>> which requires >>>> https://github.com/seductiveapps/saColorGradients >>>> and >>>> https://github.com/seductiveapps/saJSON >>>> >>>> NOTES >>>> >>>> see also my feature request to internals@lists.php.org, included here: >>>> >>>> from my master todo file at https://github.com/seductiveap >>>> ps/folderDB/blob/ >>>> master/todo.platform.txt >>>> >>>> ; >>>> [3] >>>> ---------- Forwarded message ---------- >>>> From: Rene Veerman >>>> Date: Sun, Aug 28, 2016 at 5:07 AM >>>> Subject: feature-request : html + css logging in apache logs (example >>>> for >>>> the rest of the unix community too) >>>> To: php-general@lists.php.net, internals@lists.php.net >>>> >>>> >>>> Hi. >>>> >>>> Once again, thanks for keeping PHP free to use and so widely and easily >>>> installed.. >>>> .,...........see >>>> https://github.com/seductiveapps/folderDB/blob/master/todo.platform.txt >>>> , >>>> search for [3] for a copy of the rest of this thread.............. and >>>> [4] >>>> for *this* email thread you're reading now.. >>>> >>>> On Sun, Aug 28, 2016 at 5:28 AM, Rene Veerman < >>>> rene.veerman.netherlands@gmail.com> wrote: >>>> >>>> > eh oops, this would've maybe been easier, and allows me to update >>>> these >>>> > sources in the future if and when needed.. >>>> > >>>> > https://github.com/seductiveapps/webappObfuscator/blob/master/ >>>> > webappObfuscator-1.0.0/functions__basicErrorHandling.php >>>> > https://github.com/seductiveapps/webappObfuscator/blob/master/ >>>> > webappObfuscator-1.0.0/1.0.0/functions.php >>>> > https://github.com/seductiveapps/webappObfuscator/blob/master/ >>>> > webappObfuscator-1.0.0/functions__internalErrorHandling.php >>>> > light background css : https://github.com/seductiveapps/ >>>> > webappObfuscator/blob/master/webappObfuscator-1.0.0/ >>>> > webappObfuscator-1.0.0__ajax.css >>>> > dark background css : https://github.com/seductiveapps/ >>>> > webappObfuscator/blob/master/webappObfuscator-1.0.0/ >>>> > webappObfuscator-1.0.0.css >>>> > >>>> > >>>> > On Sun, Aug 28, 2016 at 5:21 AM, Rene Veerman >>>> >>> > gmail.com> wrote: >>>> > >>>> >> all are donated to public domain : >>>> >> >>>> >> __FILE__==='functions__internalErrorHandling.php'; >>>> >> >>> >> require_once (dirname(__FILE__).'/1.0.0/functions.php'); >>>> >> require_once (dirname(__FILE__).'/functions >>>> __basicErrorHandling.php'); >>>> >> >>>> >> function woError ($errCode, $errMsgOrArray) { >>>> >> if (is_array($errMsgOrArray)) { >>>> >> >>>> >> if (ob_get_length()>0) ob_end_flush(); >>>> >> ob_start(); >>>> >> var_dump ($errMsgOrArray); >>>> >> $errMsg = ob_get_clean(); >>>> >> } else if ( >>>> >> is_string($errMsgOrArray) >>>> >> || is_int($errMsgOrArray) >>>> >> || is_float($errMsgOrArray) >>>> >> ) { >>>> >> $errMsg = '' . $errMsgOrArray; >>>> >> } else if ( >>>> >> is_bool($errMsgOrArray) >>>> >> ) { >>>> >> $errMsg = ( >>>> >> $errMsgOrArray >>>> >> ? 'TRUE' >>>> >> : 'FALSE' >>>> >> ); >>>> >> } >>>> >> //echo 't1200'; >>>> >> //echo '
'; var_dump (debug_backtrace()); echo '
'; in >>>> >> badResult() instead >>>> >> trigger_error ($errMsg, $errCode); >>>> >> } >>>> >> >>>> >> function woBasicErrorHandler ($errno, $errstr, $errfile, $errline, >>>> >> $errcontext) { >>>> >> //echo 'woBasicErrorHandler.main:start'; >>>> >> $stacktrace = debug_backtrace(); >>>> >> $errType = wo_php_errorType_humanReadable($errno); >>>> >> $errSeverity = 'woErrorSeverity__error'; >>>> >> if (stripos($errType, 'warning')!==false) $errSeverity = >>>> >> 'woErrorSeverity__warning'; >>>> >> if (stripos($errType, 'notice')!==false) $errSeverity = >>>> >> 'woErrorSeverity__notice'; >>>> >> >>>> >> if (stripos($errType, 'user')!==false) $errSeverity .= ' >>>> >> woErrorSeverity__user'; >>>> >> if (stripos($errType, 'parse')!==false) $errSeverity .= ' >>>> >> woErrorSeverity__parse'; >>>> >> if (stripos($errType, 'core')!==false) $errSeverity .= ' >>>> >> woErrorSeverity__core'; >>>> >> if (stripos($errType, 'compile')!==false) $errSeverity .= ' >>>> >> woErrorSeverity__compile'; >>>> >> $html = >>>> >> '

webappObfuscator >>>> error

' >>>> >> .'

'.$errType.' : '.$errstr.'

' >>>> >> .woBasicErrorHandler__prettyStacktrace ($stacktrace) >>>> >> .'
'; >>>> >> echo $html; >>>> >> //reportStatus (1, $html); // RV : where the F is that function?? >>>> >> die(); >>>> >> /* >>>> >> echo '

dfo error

'.errorType_humanReadable($errno).' : >>>> >> '.$errstr.'
stacktrace:

';
>>>> >> var_dump ($stacktrace);
>>>> >> echo '
';*/ >>>> >> } >>>> >> >>>> >> function woBasicErrorHandler__prettyStacktrace ($st) { >>>> >> global $errorsBasepath; >>>> >> $r = >>>> >> '
' >>>> >> .'All filenames are under : >>>> >> '.$errorsBasepath.'
'; >>>> >> foreach ($st as $stackNumber => $stackData) { >>>> >> if (array_key_exists('file', $stackData)) { >>>> >> $relPath = '...'.str_replace($errorsBasepath, '', >>>> $stackData['file']); >>>> >> } else { >>>> >> $relPath = '.../'; >>>> >> }; >>>> >> if (array_key_exists('line', $stackData)) { >>>> >> $line = '(line >>>> >> '.$stackData['line'].')'; >>>> >> } else { >>>> >> $line = ''; >>>> >> } >>>> >> $file = '__FILE__ : >>>> '.$relPath.' >>>> >> '; >>>> >> $function = >>>> >> ''.$stackData['function'].'( ' >>>> >> .( >>>> >> array_key_exists('args',$stackData) >>>> >> ? woBasicErrorHandler__prettyStacktrace__arguments >>>> ($stackData['args']) >>>> >> : '' >>>> >> ) >>>> >> .' )'; >>>> >> //if ($stackNumber > 0) { // ignore the call to saBasicErrorHandler() >>>> >> itself >>>> >> $r .= >>>> >> '
' >>>> >> .$file.' ' >>>> >> .$line.' calls ' >>>> >> .$function >>>> >> .'
'; >>>> >> //} >>>> >> }; >>>> >> $r .= '
'; >>>> >> return $r; >>>> >> } >>>> >> >>>> >> function woBasicErrorHandler__prettyStacktrace__arguments ($args) { >>>> >> $r = ''; >>>> >> foreach ($args as $argIdx => $arg) { >>>> >> if (is_array($arg)) { >>>> >> $r .= ''.ht >>>> mlentities(json_encode($arg)). >>>> >> ''; >>>> >> } elseif (is_object($arg)) { >>>> >> $r .= ''.ht >>>> mlentities(json_encode($arg)). >>>> >> ''; >>>> >> } else { >>>> >> $r .= ''.ht >>>> mlentities($arg).''; >>>> >> } >>>> >> $r .= ', '; >>>> >> } >>>> >> $r .= ''; >>>> >> return $r; >>>> >> } >>>> >> >>>> >> function wo_php_json_last_error_humanReadable ($errNo) { >>>> >> // taken from http://php.net/manual/en/function.json-last-error.php >>>> >> // on 2015 July 9th, valid for php version up to 5.5.0 >>>> >> $errorTypes = array ( >>>> >> JSON_ERROR_NONE => array ( >>>> >> 'errorCode' => 'JSON_ERROR_NONE', >>>> >> 'msg' => 'No error has occurred' >>>> >> ), >>>> >> JSON_ERROR_DEPTH => array ( >>>> >> 'errorCode' => 'JSON_ERROR_DEPTH', >>>> >> 'msg' => 'The maximum stack depth has been exceeded' >>>> >> ), >>>> >> JSON_ERROR_STATE_MISMATCH => array ( >>>> >> 'errorCode' => 'JSON_ERROR_STATE_MISMATCH', >>>> >> 'msg' => 'Invalid or malformed JSON' >>>> >> ), >>>> >> JSON_ERROR_CTRL_CHAR => array ( >>>> >> 'errorCode' => 'JSON_ERROR_CTRL_CHAR', >>>> >> 'msg' => 'Control character error, possibly incorrectly encoded' >>>> >> ), >>>> >> JSON_ERROR_SYNTAX => array ( >>>> >> 'errorCode' => 'JSON_ERROR_SYNTAX', >>>> >> 'msg' => 'Syntax error' >>>> >> ), >>>> >> JSON_ERROR_UTF8 => array ( >>>> >> 'errorCode' => 'JSON_ERROR_UTF8', >>>> >> 'msg' => 'Malformed UTF-8 characters, possibly incorrectly encoded' >>>> >> )/*, >>>> >> JSON_ERROR_RECURSION => array ( >>>> >> 'errorCode' => 'JSON_ERROR_RECURSION', >>>> >> 'msg' => 'One or more recursive references in the value to be >>>> encoded' >>>> >> ), >>>> >> JSON_ERROR_INF_OR_NAN => array ( >>>> >> 'errorCode' => 'JSON_ERROR_INF_OR_NAN', >>>> >> 'msg' => 'One or more NAN or INF values in the value to be encoded' >>>> >> ), >>>> >> JSON_ERROR_UNSUPPORTED_TYPE => array ( >>>> >> 'errorCode' => 'JSON_ERROR_UNSUPPORTED_TYPE', >>>> >> 'msg' => 'A value of a type that cannot be encoded was given' >>>> >> )*/ >>>> >> ); >>>> >> if ($errNo===0) { >>>> >> $r = $errorTypes[0]; >>>> >> } else { >>>> >> $r = >>>> >> array_key_exists ($errNo, $errorTypes) >>>> >> ? $errorTypes[$errNo] >>>> >> : array ( >>>> >> 'errorCode' => 'ERROR_UNKNOWN_ERROR', >>>> >> 'msg' => 'json_last_error() returned a code that is unknown to >>>> >> fucntions__basicErrorHandling.php::wo_php_json_last_error_hu >>>> >> manReadable()' >>>> >> ); >>>> >> }; >>>> >> return $r; >>>> >> } >>>> >> >>>> >> function wo_php_errorType_humanReadable ($errNo) { >>>> >> >>>> >> if (phpversion() < '4.0.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 2047 => 'E_ALL' >>>> >> ); >>>> >> } elseif (phpversion() < '5.0.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 16 => 'Core Error', >>>> >> 32 => 'Core Warning', >>>> >> 64 => 'Compile Error', >>>> >> 128 => 'Compile Warning', >>>> >> 256 => 'User Error', >>>> >> 512 => 'User Warning', >>>> >> 1024=> 'User Notice', >>>> >> 2047=> 'E_ALL' >>>> >> ); >>>> >> >>>> >> } elseif (phpversion() < '5.2.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 16 => 'Core Error', >>>> >> 32 => 'Core Warning', >>>> >> 64 => 'Compile Error', >>>> >> 128 => 'Compile Warning', >>>> >> 256 => 'User Error', >>>> >> 512 => 'User Warning', >>>> >> 1024=> 'User Notice', >>>> >> 2048=> 'Strict', >>>> >> 2047=> 'E_ALL' >>>> >> ); >>>> >> >>>> >> } elseif (phpversion() < '5.3.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 16 => 'Core Error', >>>> >> 32 => 'Core Warning', >>>> >> 64 => 'Compile Error', >>>> >> 128 => 'Compile Warning', >>>> >> 256 => 'User Error', >>>> >> 512 => 'User Warning', >>>> >> 1024=> 'User Notice', >>>> >> 2048=> 'Strict', >>>> >> 4096=> 'Recoverable', >>>> >> 6143=> 'E_ALL' >>>> >> ); >>>> >> >>>> >> } elseif (phpversion() >= '5.3.0' && phpversion() < '6.0.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 16 => 'Core Error', >>>> >> 32 => 'Core Warning', >>>> >> 64 => 'Compile Error', >>>> >> 128 => 'Compile Warning', >>>> >> 256 => 'User Error', >>>> >> 512 => 'User Warning', >>>> >> 1024=> 'User Notice', >>>> >> 2048=> 'Strict', >>>> >> 4096=> 'Recoverable', >>>> >> 8192=> 'Depracated', >>>> >> 16384=> 'User-level Depracated', >>>> >> 30719=> 'E_ALL' >>>> >> ); >>>> >> >>>> >> } elseif (phpversion() >= '6.0.0') { >>>> >> $errorTypes = array ( >>>> >> 1 => 'Error', >>>> >> 2 => 'Warning', >>>> >> 4 => 'Parsing Error', >>>> >> 8 => 'Notice', >>>> >> 16 => 'Core Error', >>>> >> 32 => 'Core Warning', >>>> >> 64 => 'Compile Error', >>>> >> 128 => 'Compile Warning', >>>> >> 256 => 'User Error', >>>> >> 512 => 'User Warning', >>>> >> 1024=> 'User Notice', >>>> >> 2048=> 'Strict', >>>> >> 4096=> 'Recoverable', >>>> >> 8192=> 'Depracated', >>>> >> 16384=> 'User-level Depracated', >>>> >> 32767=> 'E_ALL' >>>> >> ); >>>> >> } >>>> >> >>>> >> return $errorTypes[$errNo]; >>>> >> } >>>> >> >>>> >> ?> >>>> >> >>>> >> __FILE__==='functions__internalErrorHandling.php'; >>>> >> >>>> >> >>> >> /*--- >>>> >> this is my way of providing quality runtime debugging info >>>> >> (to the computerprogram itself, to developers, to end-users) >>>> >> and -even more important- creating robust computerprograms that >>>> >> can be debugged quickly when they break when they're faced with the >>>> >> unexpected. >>>> >> a future version of this will email all the *releveant* debug details >>>> >> to the developer(s) whenever the unexpected hits the computer program >>>> >> using this. >>>> >> draft of this extension is detailed in webappObfuscator-1.0.0.php:::w >>>> >> ebappObfuscator::readTokens() >>>> >> */ >>>> >> >>>> >> function badResult ($errNo, $errMeta=null) { >>>> >> if ( >>>> >> is_string($errNo) >>>> >> || is_array($errNo) >>>> >> ) { >>>> >> $errMeta = $errNo; >>>> >> $errNo = E_USER_ERROR; >>>> >> $errMeta['additionalError'] = 'badResult called with no $errNo as >>>> first >>>> >> parameter'; >>>> >> }; >>>> >> if (is_string($errMeta)) { >>>> >> $errMeta = array ('msg'=>$errMeta); >>>> >> }; >>>> >> //$errMeta = filterArgs($errMeta, $filterSettings); >>>> >> >>>> >> $e = array ( >>>> >> 'isMetaForFunc' => true, >>>> >> 'phpErrorClass' => $errNo, >>>> >> 'phpErrorType' => wo_php_errorType_humanReadable ($errNo), >>>> >> 'error' => $errMeta, >>>> >> ); >>>> >> $traceData = debug_backtrace(); >>>> >> $e['backtrace'] = $traceData;//phpFilterBacktraceData($traceData,$ >>>> >> filterSettings); >>>> >> $e['globals'] = getGlobals(); >>>> >> //var_dump ($e); >>>> >> /*if (function_exists('saError')) { >>>> >> echo 'error handler === saError()'; >>>> >> saError ($errNo, $errMeta); // http://seductiveapps.com >>>> >> } else*/if (function_exists('woError')) { >>>> >> echo 'error handler === woError()'; >>>> >> woError ($errNo, $errMeta); >>>> >> } else { >>>> >> echo 'functions__internalErrorHandling.php::no error handler >>>> specified, >>>> >> var_dump-ing.
';
>>>> >>  var_dump ($e);
>>>> >>  echo '
'; >>>> >> } >>>> >> return $e; >>>> >> } >>>> >> >>>> >> function getGlobals() { >>>> >> $r = array ( >>>> >> '$_GET' => $_GET, >>>> >> '$_POST' => $_POST, >>>> >> '$_COOKIE' => $_COOKIE >>>> >> ); >>>> >> return $r; >>>> >> } >>>> >> >>>> >> function good($r) { >>>> >> return ( >>>> >> is_array($r) >>>> >> && array_key_exists('result',$r) >>>> >> ); >>>> >> } >>>> >> >>>> >> //function &result(&$r) { >>>> >> function &result(&$r) { >>>> >> return $r['result']; >>>> >> } >>>> >> >>>> >> function &resultArray (&$r) { >>>> >> $r2 = array(); >>>> >> foreach ($r as $k => $v) { >>>> >> $r2[$k] = result($v); >>>> >> } >>>> >> return $r2; >>>> >> } >>>> >> >>>> >> >>>> >> function &goodResult(&$r) { >>>> >> $r2 = array ( >>>> >> 'isMetaForFunc' => true, >>>> >> 'result' => &$r >>>> >> ); >>>> >> return $r2; >>>> >> } >>>> >> ?> >>>> >> >>>> >> __FILE__==='errorHandling_css_forLightBackgrounds.css' >>>> >> .woError { border : 2px solid red; border-radius : 5px; padding : >>>> 5px; >>>> >> background : yellow; color : red; } >>>> >> .woStacktrace { font-size : 90%; font-weight : bold; } >>>> >> .woStacktrace__basePath { color : purple; } >>>> >> .woStacktrace__item { } >>>> >> .woStacktrace__file { color : navy; } >>>> >> .woStacktrace__function { color : #002300; } >>>> >> .woStacktrace__line { color : blue; } >>>> >> .woStacktrace__args { color : navy; font-weight : normal; } >>>> >> .woStacktrace__arg { color : blue; } >>>> >> .woStacktrace__argSeperator { color : purple; background : white; >>>> >> font-weight : bold; font-size : 100%; } >>>> >> >>>> >> >>>> >> __FILE__==='errorHandling_css_forDarkOrSemitransparentBackgr >>>> ounds.css' >>>> >> .woError { border : 2px solid red; border-radius : 5px; padding : >>>> 5px; >>>> >> background : yellow; color : red; opacity : 0.767 } >>>> >> .woStacktrace { font-size : 90%; font-weight : bold; } >>>> >> .woStacktrace__basePath { color : purple; } >>>> >> .woStacktrace__item { } >>>> >> .woStacktrace__file { color : navy; } >>>> >> .woStacktrace__function { color : #002300; } >>>> >> .woStacktrace__line { color : blue; } >>>> >> .woStacktrace__args { color : navy; font-weight : normal; } >>>> >> .woStacktrace__arg { color : blue; } >>>> >> .woStacktrace__argSeperator { color : purple; background : white; >>>> >> font-weight : bold; font-size : 100%; } >>>> >> >>>> >> On Sun, Aug 28, 2016 at 5:16 AM, Rene Veerman < >>>> >> rene.veerman.netherlands@gmail.com> wrote: >>>> >> >>>> >>> nothing's better than cut-n-pasting, i knooow :) >>>> >>> >>>> >>> so in the next few messages i'll include my own PHP handlers.. it's >>>> 4 >>>> >>> files, which i'll just post as ordinary text.. dunno and dont wanna >>>> test if >>>> >>> attaching works to the entire list architecture (web caches and >>>> stuff).. >>>> >>> >>>> >>> On Sun, Aug 28, 2016 at 5:07 AM, Rene Veerman < >>>> >>> rene.veerman.netherlands@gmail.com> wrote: >>>> >>> >>>> >>>> Hi. >>>> >>>> >>>> >>>> Once again, thanks for keeping PHP free to use and so widely and >>>> easily >>>> >>>> installed.. >>>> >>>> >>>> >>>> I have another feature request (sent earlier tonight).. >>>> >>>> >>>> >>>> I quite often, much more than i like, *need* a stacktrace and >>>> *proper* >>>> >>>> variable listings for each function called in PHP when it barfs >>>> out nothing >>>> >>>> more than an apache error log entry.. >>>> >>>> And can we please show such entries in the browser *as well as the >>>> >>>> apache log*? Or if nothing else, *just* in the browser? >>>> >>>> >>>> >>>> Rather than going "all the way" and making variable contents >>>> (which can >>>> >>>> grow quite large) collapsable and shit *right away*, you could >>>> simply add >>>> >>>> the right and

class="" names and supply a CSS file. I >>>> use it in >>>> >>>> all error handling that does make it to >>>> set_error_handler(myHandler), and >>>> >>>> that really is what makes things like my obfuscator (also posted >>>> about to >>>> >>>> the php-general@lists.php.net earlier tonight) possible. >>>> >>>> And taking things that far allows guys like me to provide you with >>>> a >>>> >>>> collapsable large-JSON-decoding viewer addon for such logfiles >>>> later (rest >>>> >>>> assured that that'll get done once you do this for me).. i call it >>>> >>>> jsonViewer and i should have it back up at >>>> >>>> http://seductiveapps.com/tools/json (or /jsonViewer) once the >>>> >>>> obfuscator is fully done in a few weeks, at most.. >>>> >>>> >>>> >>>> if you want me to build (and opensource) things like that >>>> >>>> true-obfuscator and my JSON scalable database architecture using >>>> just >>>> >>>> apache2+ and php5+, it would really cut my development time in >>>> more than >>>> >>>> half if you could add "all of this" (it's deadsimple and a few >>>> hours work >>>> >>>> imo) to the next versions of PHP (and please make it the default, >>>> you can >>>> >>>> include sample CSS or read in a CSS file that you set in php.ini >>>> (comment >>>> >>>> on how to do this in the logfile html please)).. >>>> >>>> >>>> >>>> see https://github.com/seductiveapps/folderDB/blob/master/todo.p >>>> >>>> latform.txt for all relevant updates concerning these developments >>>> >>>> mentioned here.. >>>> >>>> >>>> >>>> Thanks in advance for considering and likely adopting the 2 small >>>> >>>> changes i need in the next versions of PHP.. I run ubuntu btw.. >>>> I'll be >>>> >>>> checking the php.net pages for your future updates.. >>>> >>>> >>>> >>>> If anyone can gimme a duration-to-completion for each of my >>>> requests of >>>> >>>> tonight, that'd be awesome. I'll take a "wild guess", or any >>>> serious >>>> >>>> objections that i might be able to sway out of the way.. >>>> >>>> >>>> >>>> >>>> >>> >>>> >> >>>> > >>>> >>> >>> >> > --94eb2c06f45c4740f4053c47d615--