[FX.php List] How do you handle errors?
Gjermund Gusland Thorsen
ggt667 at gmail.com
Sun Apr 20 12:28:13 MDT 2008
case 2: http://www.file-making.com/gjermund/SystemStatus/striptease.phps
case 1: I guess you have to be there or write your own checkroutine...
ggt
2008/4/20, Jonathan Schwartz <jschwartz at exit445.com>:
> Not sure if I asked the question properly because I don't understand the
> answer.
>
> If FMP throws an error, the script listed below will handle it. Let's call
> this CASE 3
>
> If FMP fails to respond (incorrect instance set up/db server down/etc),
> then FMP can't provide error, but PHP can. Let's call this CASE 2.
>
> If PHP throws an error, let's call this CASE 1.
>
> The question is how to handle CASE 2 and CASE 1.
>
> In my situation, I have separate servers: one for Web/PHP and one for FMP,
> so the WEB/PHP server can report if the DB server is hosed.
>
> Jonathan
>
>
> At 5:37 PM +0200 4/20/08, Gjermund Gusland Thorsen wrote:
>
> > I use a port open scanner from a different hosting fascility.
> >
> >
> >
> > 2008/4/20, Jonathan Schwartz <jschwartz at exit445.com>:
> >
> > > I was getting there. ;-)
> > >
> > > And what do you recommend if the error is "further up"...a PHP error?
> > >
> > > J
> > >
> > >
> > > At 11:26 AM +0200 4/20/08, Gjermund Gusland Thorsen wrote:
> > >
> > > > There should obviously also be another if that if this FMNew() fails,
> > > > does exactly the same as this errorlog query, but issues and email
> > > > with the desired content.
> > > >
> > > > ggt
> > > >
> > > > 2008/4/20, Jonathan Schwartz <jschwartz at exit445.com>:
> > > >
> > > > > ggt:
> > > > >
> > > > > Thank for this script. It really helps tell the story when things
> go
> > > > > south. I've incorporated these elements into my regular log
> script,
> > > > > recording them when an error is encountered.
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Jonathan
> > > > >
> > > > >
> > > > > At 12:37 PM +0200 4/17/08, Gjermund Gusland Thorsen wrote:
> > > > >
> > > > > >
> > > > > > Here is a way to track them down:
> > > > > >
> > > > > > // Obviously I already ran a query up here that I would like to
> > > log...
> > > > > >
> > > > > > if( $r['errorCode'] != 0 ) {
> > > > > > $q = new FX( $serverIP, $webCompanionPort,
> $dataSourceType );
> > > > > > $q->SetDBData( $database, 'phpQueryLogg' );
> > > > > > $q->SetDBPassword( $webPW, $webUN );
> > > > > > $q->AddDBParam( 'queryExecuted', $r['URL'] );
> > > > > > $q->AddDBParam( 'errorCode', $r['errorCode'] );
> > > > > > $q->AddDBParam( 'post', var_export( $_POST, true ) );
> > > > > > $q->AddDBParam( 'get', var_export( $_GET, true ) );
> > > > > > $q->AddDBParam( 'server', var_export( $_SERVER, true ) );
> > > > > > $q->AddDBParam( 'cookie', var_export( $_COOKIE, true ) );
> > > > > > $q->AddDBParam( 'session', var_export( $_SESSION, true )
> );
> > > > > > $r = $q->FMNew();
> > > > > > }
> > > > > > _______________________________________________
> > > > > > FX.php_List mailing list
> > > > > > FX.php_List at mail.iviking.org
> > > > > >
> http://www.iviking.org/mailman/listinfo/fx.php_list
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Jonathan Schwartz
> > > > > Exit 445 Group
> > > > > jonathan at exit445.com
> > > > > http://www.exit445.com
> > > > > 415-381-1852
> > > > > _______________________________________________
> > > > > FX.php_List mailing list
> > > > > FX.php_List at mail.iviking.org
> > > > >
> http://www.iviking.org/mailman/listinfo/fx.php_list
> > > > >
> > > > >
> > > > _______________________________________________
> > > > FX.php_List mailing list
> > > > FX.php_List at mail.iviking.org
> > > > http://www.iviking.org/mailman/listinfo/fx.php_list
> > > >
> > >
> > >
> > > --
> > > Jonathan Schwartz
> > > Exit 445 Group
> > > jonathan at exit445.com
> > > http://www.exit445.com
> > > 415-381-1852
> > > _______________________________________________
> > > FX.php_List mailing list
> > > FX.php_List at mail.iviking.org
> > > http://www.iviking.org/mailman/listinfo/fx.php_list
> > >
> > >
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
> >
>
>
> --
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list