From bob at patin.com Fri Jan 1 13:25:12 2016 From: bob at patin.com (Bob Patin) Date: Fri Jan 1 13:25:11 2016 Subject: [FX.php List] [OFF] Yet another Bootstrap question Message-ID: <6ADF266C-CFCF-426E-945A-B2501B4F093F@patin.com> OK, I wonder if this is related to my previous issue (which is unresolved): I have a form with 2 elements: a JQuery date picker widget and a pulldown menu. On the desktop, it works great, but on my iPhone the 2 elements are disabled; the buttons are live though... Anyone seen this and figured out how to get around it? I tried adding this $(".main").prop( "disabled", false ); but it didn't make any difference. Any help appreciated, bob From bob at patin.com Mon Jan 11 13:45:53 2016 From: bob at patin.com (Bob Patin) Date: Mon Jan 11 13:45:56 2016 Subject: [FX.php List] "No Action Taken" on query Message-ID: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> Does this indicate that FX is failing to communicate w/ the Filemaker Server? Thanks, Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160111/1d6d9f23/attachment.html From tim.webko at gmail.com Mon Jan 11 14:11:34 2016 From: tim.webko at gmail.com (Tim 'Webko' Booth) Date: Mon Jan 11 14:11:37 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> Message-ID: I've not seen this error - but it's the default setting for an error message in my version of FX... Cheers Webko On 12 January 2016 at 07:45, Bob Patin wrote: > Does this indicate that FX is failing to communicate w/ the Filemaker > Server? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/943bd96f/attachment-0001.html From bob at patin.com Mon Jan 11 14:21:11 2016 From: bob at patin.com (Bob Patin) Date: Mon Jan 11 14:21:16 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> Message-ID: <353FF431-CE23-41CA-A7A5-5B37217D8DC5@patin.com> Argh? I suspect it means the WPE may not be working, but then, if FX isn?t getting to the WPE, it wouldn?t return anything at all, right? ? which is usually a config issue in the page or else the server-data page? B > On Jan 11, 2016, at 3:11 PM, Tim 'Webko' Booth wrote: > > I've not seen this error - but it's the default setting for an error message in my version of FX... > > Cheers > > Webko > > On 12 January 2016 at 07:45, Bob Patin > wrote: > Does this indicate that FX is failing to communicate w/ the Filemaker Server? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160111/02f47c58/attachment.html From malcolm at notyourhomework.net Mon Jan 11 14:50:24 2016 From: malcolm at notyourhomework.net (Malcolm Fitzgerald) Date: Mon Jan 11 14:50:34 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <353FF431-CE23-41CA-A7A5-5B37217D8DC5@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <353FF431-CE23-41CA-A7A5-5B37217D8DC5@patin.com> Message-ID: <569423A0.9020705@notyourhomework.net> On 12/01/2016 10:21 am, Bob Patin wrote: > Argh? I suspect it means the WPE may not be working, but then, if FX > isn?t getting to the WPE, it wouldn?t return anything at all, right? The web server, either apache or IIS, will be able to spit something back when WPE is down. Malcolm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/458cdd3d/attachment.html From bob at patin.com Mon Jan 11 14:52:46 2016 From: bob at patin.com (Bob Patin) Date: Mon Jan 11 14:52:50 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <569423A0.9020705@notyourhomework.net> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <353FF431-CE23-41CA-A7A5-5B37217D8DC5@patin.com> <569423A0.9020705@notyourhomework.net> Message-ID: My experience has been that, if the WPE is down, nothing gets returned from a query; I?ve tried numerous methods, because I?d love to have a page that could monitor my WPE installs and let me know if one of them loses functionality. How would you write it? Thanks, Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > On Jan 11, 2016, at 3:50 PM, Malcolm Fitzgerald wrote: > > On 12/01/2016 10:21 am, Bob Patin wrote: >> Argh? I suspect it means the WPE may not be working, but then, if FX isn?t getting to the WPE, it wouldn?t return anything at all, right? > > The web server, either apache or IIS, will be able to spit something back when WPE is down. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160111/d14354c6/attachment.html From jonathan at exit445.com Mon Jan 11 15:10:54 2016 From: jonathan at exit445.com (Jonathan Schwartz) Date: Mon Jan 11 15:10:58 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <353FF431-CE23-41CA-A7A5-5B37217D8DC5@patin.com> <569423A0.9020705@notyourhomework.net> Message-ID: Bob, In my experience, no single query will do the job because of the number of links in the chain that can fail on an CWP query. WPE failed Apache failed FMS Server failed DB offline Queried data missing Server offline Power failure Connectivity failure DNS failure A succesful WPE query demonstrate that all of the items are working. An unsuccessful query means anything in the list (and more) could be at fault. Because a WPE query won?t return a result, you can?t ask the sick server to tell you it is sick. I used to do the following: 1) Query the DB(s) at some known interval. 2) Write the timestamp(s) in a different location. 3) Query the timestamp(s) to see which had not been updated in a timely manner (indicating failure). 4) Alert me when #3 failed. I used Cron scripts to manage this process. Hope that helps. Jonathan Jonathan Schwartz jonathan@exit445.com > On Jan 11, 2016, at 1:52 PM, Bob Patin wrote: > > My experience has been that, if the WPE is down, nothing gets returned from a query; I?ve tried numerous methods, because I?d love to have a page that could monitor my WPE installs and let me know if one of them loses functionality. > > How would you write it? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > >> On Jan 11, 2016, at 3:50 PM, Malcolm Fitzgerald wrote: >> >> On 12/01/2016 10:21 am, Bob Patin wrote: >>> Argh? I suspect it means the WPE may not be working, but then, if FX isn?t getting to the WPE, it wouldn?t return anything at all, right? >> >> The web server, either apache or IIS, will be able to spit something back when WPE is down. > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From chris at iViking.org Mon Jan 11 21:22:54 2016 From: chris at iViking.org (Chris Hansen) Date: Mon Jan 11 21:19:36 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> Message-ID: <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> Bob, Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? Best, --Chris > On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: > > Does this indicate that FX is failing to communicate w/ the Filemaker Server? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160111/dc7d1e59/attachment.html From bob at patin.com Tue Jan 12 07:30:58 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 07:31:01 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> Message-ID: <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> Chris, I finally found the issue; the client had provided an incorrect server address. So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? Thanks, Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > On Jan 11, 2016, at 10:22 PM, Chris Hansen wrote: > > Bob, > > Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? > > Best, > > --Chris > >> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >> >> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >> >> Thanks, >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/0cc81028/attachment-0001.html From chris at iViking.org Tue Jan 12 10:10:03 2016 From: chris at iViking.org (Chris Hansen) Date: Tue Jan 12 10:06:39 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> Message-ID: <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> Hey Bob, Glad to hear you got that figured out. As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? Best, --Chris > On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: > > Chris, > > I finally found the issue; the client had provided an incorrect server address. > > So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > >> On Jan 11, 2016, at 10:22 PM, Chris Hansen > wrote: >> >> Bob, >> >> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >> >> Best, >> >> --Chris >> >>> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >>> >>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>> >>> Thanks, >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/6ef721d7/attachment.html From bob at patin.com Tue Jan 12 12:17:02 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 12:17:05 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> Message-ID: <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> Well? here?s what I?m doing?maybe you can tell me where my error is. I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: After my query I?m running this (I forget who gave this to me): // is server up? if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ // does a bunch of page formatting here for the display } I?ll try swapping that out for if (FX::isError($qResult)){ // do stuff } So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? Last question: is there an advantage to using FX::isError() to something like this: if ($qResult[?errorCode'] != 0 ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? Thanks, Bob Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > On Jan 12, 2016, at 11:10 AM, Chris Hansen wrote: > > Hey Bob, > > Glad to hear you got that figured out. > > As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? > > Best, > > --Chris > >> On Jan 12, 2016, at 7:30 AM, Bob Patin > wrote: >> >> Chris, >> >> I finally found the issue; the client had provided an incorrect server address. >> >> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >> >> Thanks, >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >>> On Jan 11, 2016, at 10:22 PM, Chris Hansen > wrote: >>> >>> Bob, >>> >>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>> >>> Best, >>> >>> --Chris >>> >>>> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >>>> >>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>> >>>> Thanks, >>>> >>>> Bob Patin >>>> Longterm Solutions >>>> bob@longtermsolutions.com >>>> 615-333-6858 >>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>> http://www.longtermsolutions.com >>>> - >>>> iChat: bobpatin@me.com >>>> Twitter: bobpatin >>>> ? >>>> FileMaker Consulting >>>> FileMaker Hosting for all versions of FileMaker >>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/b3ced6d9/attachment.html From tim.webko at gmail.com Tue Jan 12 14:15:27 2016 From: tim.webko at gmail.com (Tim 'Webko' Booth) Date: Tue Jan 12 14:15:29 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> Message-ID: The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): DoFXAction('view_database_names');*/ //Check if a findany to an available table works $pageObj=new FX($dbHost,$port,$dbType,$conType); $pageObj -> setDBPassword($dbPass,$dbUser); $pageObj -> setDBData($dbName,'LAYOUT', 'all'); $pageData = $pageObj -> FMFindAny(); if (FX::isError($pageData)) { echo $pageData->getMessage(); echo "
"; var_dump($pageData); } elseif ($pageData[?errorCode?] != 0) { $_SESSION['serverError'] = $pageData['errorCode']; echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; } else { var_dump($pageData); echo "All is well"; } } if ($_SESSION['serverError'] != "0") { echo "Error: ".$_SESSION['serverError']; } ?> On 13 January 2016 at 06:17, Bob Patin wrote: > Well? here?s what I?m doing?maybe you can tell me where my error is. > > I have a page that checks all of my FM Servers to see that the WPE is up; > it reloads the page every 4 minutes: > > After my query I?m running this (I forget who gave this to me): > > // is server up? > if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ > // does a bunch of page formatting here for the display > } > > I?ll try swapping that out for > > if (FX::isError($qResult)){ > // do stuff > } > > So my question is this: if the WPE is down, FX isn?t going to return > anything, is it? SO, assuming I just did a query, returning the results to > $qResult, what do I look for to be returned when the WPE doesn?t respond? I > always thought that, if WPE is down, nothing gets returned at all? > > Last question: is there an advantage to using FX::isError() to something > like this: > > if ($qResult[?errorCode'] != 0 > > ? I think you told me once that FX::isError waits for the query to finish > before it is invoked; wouldn?t that be the same thing with my little IF > statement above? Is the first method better, or just simpler? > > Thanks, > > Bob > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > > On Jan 12, 2016, at 11:10 AM, Chris Hansen > wrote: > > Hey Bob, > > Glad to hear you got that figured out. > > As for knowing when the WPE is down, if you're checking FX::isError() -- > and if you're using FX you should be -- that should give you some > indication, since there should be an error from attempting to connect to > the server. Additionally, I seem to recall that others on the list have > posted methods that they use to check server health; could some of them > chime in here? > > Best, > > --Chris > > On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: > > Chris, > > I finally found the issue; the client had provided an incorrect server > address. > > So, and I think I?ve asked this before, do you have a way that, if an FX > query fails because the WPE is down, that it?ll return an error? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > On Jan 11, 2016, at 10:22 PM, Chris Hansen > wrote: > > Bob, > > Usually when you see that error, it means that somehow an action (like > FMFind) was never reached in the code. Is there something in your code > that could be stopping things before you get to the final call, or did you > omit one? > > Best, > > --Chris > > On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: > > Does this indicate that FX is failing to communicate w/ the Filemaker > Server? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160113/363d7ff4/attachment-0001.html From bob at patin.com Tue Jan 12 14:19:49 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 14:19:53 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> Message-ID: <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> That first bit looks like what I have, so you must have been the kind donor? :) Question about your script: if the WPE is totally down, do you get anything back? Using this line > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) I get an error message sometimes, but more often than not I get nothing back at all. B Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth wrote: > > The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): > > > include_once('include/db_config.php'); // DataBase Configuration File. > include_once('include/FX/FX.php'); // FX.php file > > > //Simple server tests > $_SESSION['serverError'] = ""; // reset server error > //Check if Port 80 works at all > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { > $_SESSION['serverError'] = "Server not up"; > } else { > //Check -dbnames > /* $pageObj = new FX($dbHost,$port,$dbType,$conType); > $pageData = $pageObj->DoFXAction('view_database_names');*/ > //Check if a findany to an available table works > $pageObj=new FX($dbHost,$port,$dbType,$conType); > $pageObj -> setDBPassword($dbPass,$dbUser); > $pageObj -> setDBData($dbName,'LAYOUT', 'all'); > $pageData = $pageObj -> FMFindAny(); > if (FX::isError($pageData)) { > echo $pageData->getMessage(); > echo "
"; > var_dump($pageData); > } > elseif ($pageData[?errorCode?] != 0) { > $_SESSION['serverError'] = $pageData['errorCode']; > echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; > } > else { > var_dump($pageData); > echo "All is well"; > } > > } > if ($_SESSION['serverError'] != "0") { > echo "Error: ".$_SESSION['serverError']; > } > ?> > > On 13 January 2016 at 06:17, Bob Patin > wrote: > Well? here?s what I?m doing?maybe you can tell me where my error is. > > I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: > > After my query I?m running this (I forget who gave this to me): > > // is server up? > if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ > // does a bunch of page formatting here for the display > } > > I?ll try swapping that out for > > if (FX::isError($qResult)){ > // do stuff > } > > So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? > > Last question: is there an advantage to using FX::isError() to something like this: > > if ($qResult[?errorCode'] != 0 > > ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? > > Thanks, > > Bob > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > >> On Jan 12, 2016, at 11:10 AM, Chris Hansen > wrote: >> >> Hey Bob, >> >> Glad to hear you got that figured out. >> >> As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? >> >> Best, >> >> --Chris >> >>> On Jan 12, 2016, at 7:30 AM, Bob Patin > wrote: >>> >>> Chris, >>> >>> I finally found the issue; the client had provided an incorrect server address. >>> >>> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >>> >>> Thanks, >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>>> On Jan 11, 2016, at 10:22 PM, Chris Hansen > wrote: >>>> >>>> Bob, >>>> >>>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>>> >>>> Best, >>>> >>>> --Chris >>>> >>>>> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >>>>> >>>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>>> >>>>> Thanks, >>>>> >>>>> Bob Patin >>>>> Longterm Solutions >>>>> bob@longtermsolutions.com >>>>> 615-333-6858 >>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>> http://www.longtermsolutions.com >>>>> - >>>>> iChat: bobpatin@me.com >>>>> Twitter: bobpatin >>>>> ? >>>>> FileMaker Consulting >>>>> FileMaker Hosting for all versions of FileMaker >>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/65014208/attachment.html From tim.webko at gmail.com Tue Jan 12 14:53:00 2016 From: tim.webko at gmail.com (Tim 'Webko' Booth) Date: Tue Jan 12 14:53:05 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> Message-ID: That simply checks if there is any response on Port 80 - and I nicked that from somewhere else a long time ago... As the WPE machines in my setups are the ones using Port 80, it seems fairly reliable to me. Cheers Webko On 13 January 2016 at 08:19, Bob Patin wrote: > That first bit looks like what I have, so you must have been the kind > donor? :) > > Question about your script: if the WPE is totally down, do you get > anything back? Using this line > > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) > > > I get an error message sometimes, but more often than not I get nothing > back at all. > > B > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > > On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth > wrote: > > The one I generally use just for testing the first place (so could be > adapted to do other things if used on a cronjob or similar): > > > include_once('include/db_config.php'); // DataBase Configuration File. > include_once('include/FX/FX.php'); // FX.php file > > > //Simple server tests > $_SESSION['serverError'] = ""; // reset server error > //Check if Port 80 works at all > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { > $_SESSION['serverError'] = "Server not up"; > } else { > //Check -dbnames > /* $pageObj = new FX($dbHost,$port,$dbType,$conType); > $pageData = $pageObj->DoFXAction('view_database_names');*/ > //Check if a findany to an available table works > $pageObj=new FX($dbHost,$port,$dbType,$conType); > $pageObj -> setDBPassword($dbPass,$dbUser); > $pageObj -> setDBData($dbName,'LAYOUT', 'all'); > $pageData = $pageObj -> FMFindAny(); > if (FX::isError($pageData)) { > echo $pageData->getMessage(); > echo "
"; > var_dump($pageData); > } > elseif ($pageData[?errorCode?] != 0) { > $_SESSION['serverError'] = $pageData['errorCode']; > echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; > } > else { > var_dump($pageData); > echo "All is well"; > } > } > if ($_SESSION['serverError'] != "0") { > echo "Error: ".$_SESSION['serverError']; > } > ?> > > On 13 January 2016 at 06:17, Bob Patin wrote: > >> Well? here?s what I?m doing?maybe you can tell me where my error is. >> >> I have a page that checks all of my FM Servers to see that the WPE is up; >> it reloads the page every 4 minutes: >> >> After my query I?m running this (I forget who gave this to me): >> >> // is server up? >> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >> // does a bunch of page formatting here for the display >> } >> >> I?ll try swapping that out for >> >> if (FX::isError($qResult)){ >> // do stuff >> } >> >> So my question is this: if the WPE is down, FX isn?t going to return >> anything, is it? SO, assuming I just did a query, returning the results to >> $qResult, what do I look for to be returned when the WPE doesn?t respond? I >> always thought that, if WPE is down, nothing gets returned at all? >> >> Last question: is there an advantage to using FX::isError() to something >> like this: >> >> if ($qResult[?errorCode'] != 0 >> >> ? I think you told me once that FX::isError waits for the query to finish >> before it is invoked; wouldn?t that be the same thing with my little IF >> statement above? Is the first method better, or just simpler? >> >> Thanks, >> >> Bob >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> >> >> On Jan 12, 2016, at 11:10 AM, Chris Hansen > > wrote: >> >> Hey Bob, >> >> Glad to hear you got that figured out. >> >> As for knowing when the WPE is down, if you're checking FX::isError() -- >> and if you're using FX you should be -- that should give you some >> indication, since there should be an error from attempting to connect to >> the server. Additionally, I seem to recall that others on the list have >> posted methods that they use to check server health; could some of them >> chime in here? >> >> Best, >> >> --Chris >> >> On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: >> >> Chris, >> >> I finally found the issue; the client had provided an incorrect server >> address. >> >> So, and I think I?ve asked this before, do you have a way that, if an FX >> query fails because the WPE is down, that it?ll return an error? >> >> Thanks, >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> On Jan 11, 2016, at 10:22 PM, Chris Hansen > > wrote: >> >> Bob, >> >> Usually when you see that error, it means that somehow an action (like >> FMFind) was never reached in the code. Is there something in your code >> that could be stopping things before you get to the final call, or did you >> omit one? >> >> Best, >> >> --Chris >> >> On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: >> >> Does this indicate that FX is failing to communicate w/ the Filemaker >> Server? >> >> Thanks, >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160113/9ee7dfdc/attachment-0001.html From bob at patin.com Tue Jan 12 15:01:56 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 15:02:00 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> Message-ID: <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> But do you get anything back if WPE is off? THat?s where I can?t seem to find a workable solution; it polls the machines just fine, but if the WPE is off, nothing gets returned and my script stalls out on the errant machine? Bob Patin Longterm Solutions bob@longtermsolutions.com 615-333-6858 FileMaker 9, 10, 11, 12 & 13 Certified Developer http://www.longtermsolutions.com - iChat: bobpatin@me.com Twitter: bobpatin ? FileMaker Consulting FileMaker Hosting for all versions of FileMaker PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth wrote: > > That simply checks if there is any response on Port 80 - and I nicked that from somewhere else a long time ago... > > As the WPE machines in my setups are the ones using Port 80, it seems fairly reliable to me. > > Cheers > > Webko > > On 13 January 2016 at 08:19, Bob Patin > wrote: > That first bit looks like what I have, so you must have been the kind donor? :) > > Question about your script: if the WPE is totally down, do you get anything back? Using this line > >> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) > > I get an error message sometimes, but more often than not I get nothing back at all. > > B > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > >> On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth > wrote: >> >> The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): >> >> > >> include_once('include/db_config.php'); // DataBase Configuration File. >> include_once('include/FX/FX.php'); // FX.php file >> >> >> //Simple server tests >> $_SESSION['serverError'] = ""; // reset server error >> //Check if Port 80 works at all >> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { >> $_SESSION['serverError'] = "Server not up"; >> } else { >> //Check -dbnames >> /* $pageObj = new FX($dbHost,$port,$dbType,$conType); >> $pageData = $pageObj->DoFXAction('view_database_names');*/ >> //Check if a findany to an available table works >> $pageObj=new FX($dbHost,$port,$dbType,$conType); >> $pageObj -> setDBPassword($dbPass,$dbUser); >> $pageObj -> setDBData($dbName,'LAYOUT', 'all'); >> $pageData = $pageObj -> FMFindAny(); >> if (FX::isError($pageData)) { >> echo $pageData->getMessage(); >> echo "
"; >> var_dump($pageData); >> } >> elseif ($pageData[?errorCode?] != 0) { >> $_SESSION['serverError'] = $pageData['errorCode']; >> echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; >> } >> else { >> var_dump($pageData); >> echo "All is well"; >> } >> >> } >> if ($_SESSION['serverError'] != "0") { >> echo "Error: ".$_SESSION['serverError']; >> } >> ?> >> >> On 13 January 2016 at 06:17, Bob Patin > wrote: >> Well? here?s what I?m doing?maybe you can tell me where my error is. >> >> I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: >> >> After my query I?m running this (I forget who gave this to me): >> >> // is server up? >> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >> // does a bunch of page formatting here for the display >> } >> >> I?ll try swapping that out for >> >> if (FX::isError($qResult)){ >> // do stuff >> } >> >> So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? >> >> Last question: is there an advantage to using FX::isError() to something like this: >> >> if ($qResult[?errorCode'] != 0 >> >> ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? >> >> Thanks, >> >> Bob >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> >> >>> On Jan 12, 2016, at 11:10 AM, Chris Hansen > wrote: >>> >>> Hey Bob, >>> >>> Glad to hear you got that figured out. >>> >>> As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? >>> >>> Best, >>> >>> --Chris >>> >>>> On Jan 12, 2016, at 7:30 AM, Bob Patin > wrote: >>>> >>>> Chris, >>>> >>>> I finally found the issue; the client had provided an incorrect server address. >>>> >>>> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >>>> >>>> Thanks, >>>> >>>> Bob Patin >>>> Longterm Solutions >>>> bob@longtermsolutions.com >>>> 615-333-6858 >>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>> http://www.longtermsolutions.com >>>> - >>>> iChat: bobpatin@me.com >>>> Twitter: bobpatin >>>> ? >>>> FileMaker Consulting >>>> FileMaker Hosting for all versions of FileMaker >>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>> >>>>> On Jan 11, 2016, at 10:22 PM, Chris Hansen > wrote: >>>>> >>>>> Bob, >>>>> >>>>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>>>> >>>>> Best, >>>>> >>>>> --Chris >>>>> >>>>>> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >>>>>> >>>>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Bob Patin >>>>>> Longterm Solutions >>>>>> bob@longtermsolutions.com >>>>>> 615-333-6858 >>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>> http://www.longtermsolutions.com >>>>>> - >>>>>> iChat: bobpatin@me.com >>>>>> Twitter: bobpatin >>>>>> ? >>>>>> FileMaker Consulting >>>>>> FileMaker Hosting for all versions of FileMaker >>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>> >>>>>> _______________________________________________ >>>>>> FX.php_List mailing list >>>>>> FX.php_List@mail.iviking.org >>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/427b32e8/attachment-0001.html From tim.webko at gmail.com Tue Jan 12 15:07:28 2016 From: tim.webko at gmail.com (Tim 'Webko' Booth) Date: Tue Jan 12 15:07:31 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> Message-ID: If it responds on Port 80, then the next section should throw some form of error... On 13 January 2016 at 09:01, Bob Patin wrote: > But do you get anything back if WPE is off? THat?s where I can?t seem to > find a workable solution; it polls the machines just fine, but if the WPE > is off, nothing gets returned and my script stalls out on the errant > machine? > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth > wrote: > > That simply checks if there is any response on Port 80 - and I nicked that > from somewhere else a long time ago... > > As the WPE machines in my setups are the ones using Port 80, it seems > fairly reliable to me. > > Cheers > > Webko > > On 13 January 2016 at 08:19, Bob Patin wrote: > >> That first bit looks like what I have, so you must have been the kind >> donor? :) >> >> Question about your script: if the WPE is totally down, do you get >> anything back? Using this line >> >> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) >> >> >> I get an error message sometimes, but more often than not I get nothing >> back at all. >> >> B >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> >> >> On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth >> wrote: >> >> The one I generally use just for testing the first place (so could be >> adapted to do other things if used on a cronjob or similar): >> >> > >> include_once('include/db_config.php'); // DataBase Configuration File. >> include_once('include/FX/FX.php'); // FX.php file >> >> >> //Simple server tests >> $_SESSION['serverError'] = ""; // reset server error >> //Check if Port 80 works at all >> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { >> $_SESSION['serverError'] = "Server not up"; >> } else { >> //Check -dbnames >> /* $pageObj = new FX($dbHost,$port,$dbType,$conType); >> $pageData = $pageObj->DoFXAction('view_database_names');*/ >> //Check if a findany to an available table works >> $pageObj=new FX($dbHost,$port,$dbType,$conType); >> $pageObj -> setDBPassword($dbPass,$dbUser); >> $pageObj -> setDBData($dbName,'LAYOUT', 'all'); >> $pageData = $pageObj -> FMFindAny(); >> if (FX::isError($pageData)) { >> echo $pageData->getMessage(); >> echo "
"; >> var_dump($pageData); >> } >> elseif ($pageData[?errorCode?] != 0) { >> $_SESSION['serverError'] = $pageData['errorCode']; >> echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; >> } >> else { >> var_dump($pageData); >> echo "All is well"; >> } >> } >> if ($_SESSION['serverError'] != "0") { >> echo "Error: ".$_SESSION['serverError']; >> } >> ?> >> >> On 13 January 2016 at 06:17, Bob Patin wrote: >> >>> Well? here?s what I?m doing?maybe you can tell me where my error is. >>> >>> I have a page that checks all of my FM Servers to see that the WPE is >>> up; it reloads the page every 4 minutes: >>> >>> After my query I?m running this (I forget who gave this to me): >>> >>> // is server up? >>> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >>> // does a bunch of page formatting here for the display >>> } >>> >>> I?ll try swapping that out for >>> >>> if (FX::isError($qResult)){ >>> // do stuff >>> } >>> >>> So my question is this: if the WPE is down, FX isn?t going to return >>> anything, is it? SO, assuming I just did a query, returning the results to >>> $qResult, what do I look for to be returned when the WPE doesn?t respond? I >>> always thought that, if WPE is down, nothing gets returned at all? >>> >>> Last question: is there an advantage to using FX::isError() to something >>> like this: >>> >>> if ($qResult[?errorCode'] != 0 >>> >>> ? I think you told me once that FX::isError waits for the query to >>> finish before it is invoked; wouldn?t that be the same thing with my little >>> IF statement above? Is the first method better, or just simpler? >>> >>> Thanks, >>> >>> Bob >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> >>> >>> On Jan 12, 2016, at 11:10 AM, Chris Hansen >> > wrote: >>> >>> Hey Bob, >>> >>> Glad to hear you got that figured out. >>> >>> As for knowing when the WPE is down, if you're checking FX::isError() -- >>> and if you're using FX you should be -- that should give you some >>> indication, since there should be an error from attempting to connect to >>> the server. Additionally, I seem to recall that others on the list have >>> posted methods that they use to check server health; could some of them >>> chime in here? >>> >>> Best, >>> >>> --Chris >>> >>> On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: >>> >>> Chris, >>> >>> I finally found the issue; the client had provided an incorrect server >>> address. >>> >>> So, and I think I?ve asked this before, do you have a way that, if an FX >>> query fails because the WPE is down, that it?ll return an error? >>> >>> Thanks, >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> On Jan 11, 2016, at 10:22 PM, Chris Hansen >> > wrote: >>> >>> Bob, >>> >>> Usually when you see that error, it means that somehow an action (like >>> FMFind) was never reached in the code. Is there something in your code >>> that could be stopping things before you get to the final call, or did you >>> omit one? >>> >>> Best, >>> >>> --Chris >>> >>> On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: >>> >>> Does this indicate that FX is failing to communicate w/ the Filemaker >>> Server? >>> >>> Thanks, >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160113/8fca8a85/attachment-0001.html From jonathan at exit445.com Tue Jan 12 15:22:12 2016 From: jonathan at exit445.com (Jonathan Schwartz) Date: Tue Jan 12 15:22:15 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> Message-ID: Bob, Repeating my suggestion from yesterday?a sick WPE can?t tell you it?s sick. It just doesn?t respond. So rather than trying to make that work, consider the approach I suggested: 1) Poll the machines at some regular interval, looking for a known WPE result. Record the timestamp in a separate server. 2) In a separate script, examine the length of time elapsed since the most recent polling timestamp. If it exceeds the interval, you can conclude that WPE has not responded on the target server. So, lack of a timely response is your foolproof detection mechanism. I had this running on a 10 minute interval on a very busy e-commerce website. Worked like a charm. Hope that helps. Jonathan Jonathan Schwartz jonathan@exit445.com > On Jan 12, 2016, at 2:01 PM, Bob Patin wrote: > > But do you get anything back if WPE is off? THat?s where I can?t seem to find a workable solution; it polls the machines just fine, but if the WPE is off, nothing gets returned and my script stalls out on the errant machine? > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > >> On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth wrote: >> >> That simply checks if there is any response on Port 80 - and I nicked that from somewhere else a long time ago... >> >> As the WPE machines in my setups are the ones using Port 80, it seems fairly reliable to me. >> >> Cheers >> >> Webko >> >> On 13 January 2016 at 08:19, Bob Patin wrote: >> That first bit looks like what I have, so you must have been the kind donor? :) >> >> Question about your script: if the WPE is totally down, do you get anything back? Using this line >> >>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) >> >> I get an error message sometimes, but more often than not I get nothing back at all. >> >> B >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >> >> >>> On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth wrote: >>> >>> The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): >>> >>> >> >>> include_once('include/db_config.php'); // DataBase Configuration File. >>> include_once('include/FX/FX.php'); // FX.php file >>> >>> >>> //Simple server tests >>> $_SESSION['serverError'] = ""; // reset server error >>> //Check if Port 80 works at all >>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { >>> $_SESSION['serverError'] = "Server not up"; >>> } else { >>> //Check -dbnames >>> /* $pageObj = new FX($dbHost,$port,$dbType,$conType); >>> $pageData = $pageObj->DoFXAction('view_database_names');*/ >>> //Check if a findany to an available table works >>> $pageObj=new FX($dbHost,$port,$dbType,$conType); >>> $pageObj -> setDBPassword($dbPass,$dbUser); >>> $pageObj -> setDBData($dbName,'LAYOUT', 'all'); >>> $pageData = $pageObj -> FMFindAny(); >>> if (FX::isError($pageData)) { >>> echo $pageData->getMessage(); >>> echo "
"; >>> var_dump($pageData); >>> } >>> elseif ($pageData[?errorCode?] != 0) { >>> $_SESSION['serverError'] = $pageData['errorCode']; >>> echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; >>> } >>> else { >>> var_dump($pageData); >>> echo "All is well"; >>> } >>> >>> } >>> if ($_SESSION['serverError'] != "0") { >>> echo "Error: ".$_SESSION['serverError']; >>> } >>> ?> >>> >>> On 13 January 2016 at 06:17, Bob Patin wrote: >>> Well? here?s what I?m doing?maybe you can tell me where my error is. >>> >>> I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: >>> >>> After my query I?m running this (I forget who gave this to me): >>> >>> // is server up? >>> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >>> // does a bunch of page formatting here for the display >>> } >>> >>> I?ll try swapping that out for >>> >>> if (FX::isError($qResult)){ >>> // do stuff >>> } >>> >>> So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? >>> >>> Last question: is there an advantage to using FX::isError() to something like this: >>> >>> if ($qResult[?errorCode'] != 0 >>> >>> ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? >>> >>> Thanks, >>> >>> Bob >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> >>> >>>> On Jan 12, 2016, at 11:10 AM, Chris Hansen wrote: >>>> >>>> Hey Bob, >>>> >>>> Glad to hear you got that figured out. >>>> >>>> As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? >>>> >>>> Best, >>>> >>>> --Chris >>>> >>>>> On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: >>>>> >>>>> Chris, >>>>> >>>>> I finally found the issue; the client had provided an incorrect server address. >>>>> >>>>> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >>>>> >>>>> Thanks, >>>>> >>>>> Bob Patin >>>>> Longterm Solutions >>>>> bob@longtermsolutions.com >>>>> 615-333-6858 >>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>> http://www.longtermsolutions.com >>>>> - >>>>> iChat: bobpatin@me.com >>>>> Twitter: bobpatin >>>>> ? >>>>> FileMaker Consulting >>>>> FileMaker Hosting for all versions of FileMaker >>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>> >>>>>> On Jan 11, 2016, at 10:22 PM, Chris Hansen wrote: >>>>>> >>>>>> Bob, >>>>>> >>>>>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>>>>> >>>>>> Best, >>>>>> >>>>>> --Chris >>>>>> >>>>>>> On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: >>>>>>> >>>>>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Bob Patin >>>>>>> Longterm Solutions >>>>>>> bob@longtermsolutions.com >>>>>>> 615-333-6858 >>>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>>> http://www.longtermsolutions.com >>>>>>> - >>>>>>> iChat: bobpatin@me.com >>>>>>> Twitter: bobpatin >>>>>>> ? >>>>>>> FileMaker Consulting >>>>>>> FileMaker Hosting for all versions of FileMaker >>>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>>> >>>>>>> _______________________________________________ >>>>>>> FX.php_List mailing list >>>>>>> FX.php_List@mail.iviking.org >>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>> >>>>>> _______________________________________________ >>>>>> FX.php_List mailing list >>>>>> FX.php_List@mail.iviking.org >>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list From bob at patin.com Tue Jan 12 15:53:48 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 15:53:52 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> Message-ID: That?s close to what I?m doing now; I poll the server, and if it doesn?t respond in a few seconds, I poll it a 2nd time. My hope was that, if the 2nd one failed, I could then do some things to alert me (SMS, email, on-screen, all of which it already does). The only problem is that if WPE fails, it hangs up the code and it doesn?t proceed any farther. What I?d love is some sort of mechanism that catches this in some sort of IF statement and then lets me do the alerts. But your idea may work; I could perhaps do a query in a loop for x times; if it fails all 5 times (or whatever) I could then simply exit and display the alert. I don?t think I?d need a 2nd machine though? B > On Jan 12, 2016, at 4:22 PM, Jonathan Schwartz wrote: > > Bob, > > Repeating my suggestion from yesterday?a sick WPE can?t tell you it?s sick. It just doesn?t respond. So rather than trying to make that work, consider the approach I suggested: > 1) Poll the machines at some regular interval, looking for a known WPE result. Record the timestamp in a separate server. > 2) In a separate script, examine the length of time elapsed since the most recent polling timestamp. If it exceeds the interval, you can conclude that WPE has not responded on the target server. So, lack of a timely response is your foolproof detection mechanism. > > I had this running on a 10 minute interval on a very busy e-commerce website. Worked like a charm. > > Hope that helps. > > Jonathan > > Jonathan Schwartz > jonathan@exit445.com > > > >> On Jan 12, 2016, at 2:01 PM, Bob Patin wrote: >> >> But do you get anything back if WPE is off? THat?s where I can?t seem to find a workable solution; it polls the machines just fine, but if the WPE is off, nothing gets returned and my script stalls out on the errant machine? >> >> Bob Patin >> Longterm Solutions >> bob@longtermsolutions.com >> 615-333-6858 >> FileMaker 9, 10, 11, 12 & 13 Certified Developer >> http://www.longtermsolutions.com >> - >> iChat: bobpatin@me.com >> Twitter: bobpatin >> ? >> FileMaker Consulting >> FileMaker Hosting for all versions of FileMaker >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >> >>> On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth wrote: >>> >>> That simply checks if there is any response on Port 80 - and I nicked that from somewhere else a long time ago... >>> >>> As the WPE machines in my setups are the ones using Port 80, it seems fairly reliable to me. >>> >>> Cheers >>> >>> Webko >>> >>> On 13 January 2016 at 08:19, Bob Patin wrote: >>> That first bit looks like what I have, so you must have been the kind donor? :) >>> >>> Question about your script: if the WPE is totally down, do you get anything back? Using this line >>> >>>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) >>> >>> I get an error message sometimes, but more often than not I get nothing back at all. >>> >>> B >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>> >>> >>>> On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth wrote: >>>> >>>> The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): >>>> >>>> >>> >>>> include_once('include/db_config.php'); // DataBase Configuration File. >>>> include_once('include/FX/FX.php'); // FX.php file >>>> >>>> >>>> //Simple server tests >>>> $_SESSION['serverError'] = ""; // reset server error >>>> //Check if Port 80 works at all >>>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { >>>> $_SESSION['serverError'] = "Server not up"; >>>> } else { >>>> //Check -dbnames >>>> /* $pageObj = new FX($dbHost,$port,$dbType,$conType); >>>> $pageData = $pageObj->DoFXAction('view_database_names');*/ >>>> //Check if a findany to an available table works >>>> $pageObj=new FX($dbHost,$port,$dbType,$conType); >>>> $pageObj -> setDBPassword($dbPass,$dbUser); >>>> $pageObj -> setDBData($dbName,'LAYOUT', 'all'); >>>> $pageData = $pageObj -> FMFindAny(); >>>> if (FX::isError($pageData)) { >>>> echo $pageData->getMessage(); >>>> echo "
"; >>>> var_dump($pageData); >>>> } >>>> elseif ($pageData[?errorCode?] != 0) { >>>> $_SESSION['serverError'] = $pageData['errorCode']; >>>> echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; >>>> } >>>> else { >>>> var_dump($pageData); >>>> echo "All is well"; >>>> } >>>> >>>> } >>>> if ($_SESSION['serverError'] != "0") { >>>> echo "Error: ".$_SESSION['serverError']; >>>> } >>>> ?> >>>> >>>> On 13 January 2016 at 06:17, Bob Patin wrote: >>>> Well? here?s what I?m doing?maybe you can tell me where my error is. >>>> >>>> I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: >>>> >>>> After my query I?m running this (I forget who gave this to me): >>>> >>>> // is server up? >>>> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >>>> // does a bunch of page formatting here for the display >>>> } >>>> >>>> I?ll try swapping that out for >>>> >>>> if (FX::isError($qResult)){ >>>> // do stuff >>>> } >>>> >>>> So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? >>>> >>>> Last question: is there an advantage to using FX::isError() to something like this: >>>> >>>> if ($qResult[?errorCode'] != 0 >>>> >>>> ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? >>>> >>>> Thanks, >>>> >>>> Bob >>>> >>>> Bob Patin >>>> Longterm Solutions >>>> bob@longtermsolutions.com >>>> 615-333-6858 >>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>> http://www.longtermsolutions.com >>>> - >>>> iChat: bobpatin@me.com >>>> Twitter: bobpatin >>>> ? >>>> FileMaker Consulting >>>> FileMaker Hosting for all versions of FileMaker >>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>> >>>> >>>> >>>>> On Jan 12, 2016, at 11:10 AM, Chris Hansen wrote: >>>>> >>>>> Hey Bob, >>>>> >>>>> Glad to hear you got that figured out. >>>>> >>>>> As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? >>>>> >>>>> Best, >>>>> >>>>> --Chris >>>>> >>>>>> On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: >>>>>> >>>>>> Chris, >>>>>> >>>>>> I finally found the issue; the client had provided an incorrect server address. >>>>>> >>>>>> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Bob Patin >>>>>> Longterm Solutions >>>>>> bob@longtermsolutions.com >>>>>> 615-333-6858 >>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>> http://www.longtermsolutions.com >>>>>> - >>>>>> iChat: bobpatin@me.com >>>>>> Twitter: bobpatin >>>>>> ? >>>>>> FileMaker Consulting >>>>>> FileMaker Hosting for all versions of FileMaker >>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>> >>>>>>> On Jan 11, 2016, at 10:22 PM, Chris Hansen wrote: >>>>>>> >>>>>>> Bob, >>>>>>> >>>>>>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> --Chris >>>>>>> >>>>>>>> On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: >>>>>>>> >>>>>>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Bob Patin >>>>>>>> Longterm Solutions >>>>>>>> bob@longtermsolutions.com >>>>>>>> 615-333-6858 >>>>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>>>> http://www.longtermsolutions.com >>>>>>>> - >>>>>>>> iChat: bobpatin@me.com >>>>>>>> Twitter: bobpatin >>>>>>>> ? >>>>>>>> FileMaker Consulting >>>>>>>> FileMaker Hosting for all versions of FileMaker >>>>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> FX.php_List mailing list >>>>>>>> FX.php_List@mail.iviking.org >>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>>> >>>>>>> _______________________________________________ >>>>>>> FX.php_List mailing list >>>>>>> FX.php_List@mail.iviking.org >>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>> >>>>>> _______________________________________________ >>>>>> FX.php_List mailing list >>>>>> FX.php_List@mail.iviking.org >>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/8c51a802/attachment-0001.html From tim.webko at gmail.com Tue Jan 12 15:56:28 2016 From: tim.webko at gmail.com (Tim 'Webko' Booth) Date: Tue Jan 12 15:56:33 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> Message-ID: Any monitoring of a web server (of any sort) has to occur on a different machine though, surely? If the web server has fallen over, then it can't check itself... At a previous job, we had an external web server that ran all of this for all of the servers (we had about 10 active machines). On 13 January 2016 at 09:53, Bob Patin wrote: > That?s close to what I?m doing now; I poll the server, and if it doesn?t > respond in a few seconds, I poll it a 2nd time. My hope was that, if the > 2nd one failed, I could then do some things to alert me (SMS, email, > on-screen, all of which it already does). > > The only problem is that if WPE fails, it hangs up the code and it doesn?t > proceed any farther. What I?d love is some sort of mechanism that catches > this in some sort of IF statement and then lets me do the alerts. > > But your idea may work; I could perhaps do a query in a loop for x times; > if it fails all 5 times (or whatever) I could then simply exit and display > the alert. I don?t think I?d need a 2nd machine though? > > B > > > On Jan 12, 2016, at 4:22 PM, Jonathan Schwartz > wrote: > > Bob, > > Repeating my suggestion from yesterday?a sick WPE can?t tell you it?s > sick. It just doesn?t respond. So rather than trying to make that work, > consider the approach I suggested: > 1) Poll the machines at some regular interval, looking for a known WPE > result. Record the timestamp in a separate server. > 2) In a separate script, examine the length of time elapsed since the most > recent polling timestamp. If it exceeds the interval, you can conclude > that WPE has not responded on the target server. So, lack of a timely > response is your foolproof detection mechanism. > > I had this running on a 10 minute interval on a very busy e-commerce > website. Worked like a charm. > > Hope that helps. > > Jonathan > > Jonathan Schwartz > jonathan@exit445.com > > > > On Jan 12, 2016, at 2:01 PM, Bob Patin wrote: > > But do you get anything back if WPE is off? THat?s where I can?t seem to > find a workable solution; it polls the machines just fine, but if the WPE > is off, nothing gets returned and my script stalls out on the errant > machine? > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth > wrote: > > That simply checks if there is any response on Port 80 - and I nicked that > from somewhere else a long time ago... > > As the WPE machines in my setups are the ones using Port 80, it seems > fairly reliable to me. > > Cheers > > Webko > > On 13 January 2016 at 08:19, Bob Patin wrote: > That first bit looks like what I have, so you must have been the kind > donor? :) > > Question about your script: if the WPE is totally down, do you get > anything back? Using this line > > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) > > > I get an error message sometimes, but more often than not I get nothing > back at all. > > B > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > > On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth > wrote: > > The one I generally use just for testing the first place (so could be > adapted to do other things if used on a cronjob or similar): > > > include_once('include/db_config.php'); // DataBase Configuration File. > include_once('include/FX/FX.php'); // FX.php file > > > //Simple server tests > $_SESSION['serverError'] = ""; // reset server error > //Check if Port 80 works at all > if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { > $_SESSION['serverError'] = "Server not up"; > } else { > //Check -dbnames > /* $pageObj = new FX($dbHost,$port,$dbType,$conType); > $pageData = $pageObj->DoFXAction('view_database_names');*/ > //Check if a findany to an available table works > $pageObj=new FX($dbHost,$port,$dbType,$conType); > $pageObj -> setDBPassword($dbPass,$dbUser); > $pageObj -> setDBData($dbName,'LAYOUT', 'all'); > $pageData = $pageObj -> FMFindAny(); > if (FX::isError($pageData)) { > echo $pageData->getMessage(); > echo "
"; > var_dump($pageData); > } > elseif ($pageData[?errorCode?] != 0) { > $_SESSION['serverError'] = $pageData['errorCode']; > echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; > } > else { > var_dump($pageData); > echo "All is well"; > } > > } > if ($_SESSION['serverError'] != "0") { > echo "Error: ".$_SESSION['serverError']; > } > ?> > > On 13 January 2016 at 06:17, Bob Patin wrote: > Well? here?s what I?m doing?maybe you can tell me where my error is. > > I have a page that checks all of my FM Servers to see that the WPE is up; > it reloads the page every 4 minutes: > > After my query I?m running this (I forget who gave this to me): > > // is server up? > if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ > // does a bunch of page formatting here for the display > } > > I?ll try swapping that out for > > if (FX::isError($qResult)){ > // do stuff > } > > So my question is this: if the WPE is down, FX isn?t going to return > anything, is it? SO, assuming I just did a query, returning the results to > $qResult, what do I look for to be returned when the WPE doesn?t respond? I > always thought that, if WPE is down, nothing gets returned at all? > > Last question: is there an advantage to using FX::isError() to something > like this: > > if ($qResult[?errorCode'] != 0 > > ? I think you told me once that FX::isError waits for the query to finish > before it is invoked; wouldn?t that be the same thing with my little IF > statement above? Is the first method better, or just simpler? > > Thanks, > > Bob > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > > > On Jan 12, 2016, at 11:10 AM, Chris Hansen wrote: > > Hey Bob, > > Glad to hear you got that figured out. > > As for knowing when the WPE is down, if you're checking FX::isError() -- > and if you're using FX you should be -- that should give you some > indication, since there should be an error from attempting to connect to > the server. Additionally, I seem to recall that others on the list have > posted methods that they use to check server health; could some of them > chime in here? > > Best, > > --Chris > > On Jan 12, 2016, at 7:30 AM, Bob Patin wrote: > > Chris, > > I finally found the issue; the client had provided an incorrect server > address. > > So, and I think I?ve asked this before, do you have a way that, if an FX > query fails because the WPE is down, that it?ll return an error? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > On Jan 11, 2016, at 10:22 PM, Chris Hansen wrote: > > Bob, > > Usually when you see that error, it means that somehow an action (like > FMFind) was never reached in the code. Is there something in your code > that could be stopping things before you get to the final call, or did you > omit one? > > Best, > > --Chris > > On Jan 11, 2016, at 1:45 PM, Bob Patin wrote: > > Does this indicate that FX is failing to communicate w/ the Filemaker > Server? > > Thanks, > > Bob Patin > Longterm Solutions > bob@longtermsolutions.com > 615-333-6858 > FileMaker 9, 10, 11, 12 & 13 Certified Developer > http://www.longtermsolutions.com > - > iChat: bobpatin@me.com > Twitter: bobpatin > ? > FileMaker Consulting > FileMaker Hosting for all versions of FileMaker > PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160113/6f55bf8d/attachment-0001.html From bob at patin.com Tue Jan 12 16:00:44 2016 From: bob at patin.com (Bob Patin) Date: Tue Jan 12 16:00:47 2016 Subject: [FX.php List] "No Action Taken" on query In-Reply-To: References: <04321759-B42C-42FC-82EB-4D26EF4961D7@patin.com> <41B68751-C13F-481E-8EBF-344AF07CFB40@iViking.org> <6E3E3C08-E7A3-466C-BFD8-C8D2FAC897B5@patin.com> <0DA9DB3F-1C21-4300-B945-DB373C4AEBB4@iViking.org> <3BCD18AA-85E2-42A8-9BCE-2EA38E9A5BC6@patin.com> <6E5C2B47-FAB8-4D8E-A89B-7E66B74E81E8@patin.com> <109C9C9E-A3F5-419B-A446-D46F50FA618E@patin.com> Message-ID: <9177F54B-C779-4A5C-8525-E960409EADB1@patin.com> OH? yes, it?s actually running on one of my web servers? :) > On Jan 12, 2016, at 4:56 PM, Tim 'Webko' Booth wrote: > > Any monitoring of a web server (of any sort) has to occur on a different machine though, surely? If the web server has fallen over, then it can't check itself... > > At a previous job, we had an external web server that ran all of this for all of the servers (we had about 10 active machines). > > On 13 January 2016 at 09:53, Bob Patin > wrote: > That?s close to what I?m doing now; I poll the server, and if it doesn?t respond in a few seconds, I poll it a 2nd time. My hope was that, if the 2nd one failed, I could then do some things to alert me (SMS, email, on-screen, all of which it already does). > > The only problem is that if WPE fails, it hangs up the code and it doesn?t proceed any farther. What I?d love is some sort of mechanism that catches this in some sort of IF statement and then lets me do the alerts. > > But your idea may work; I could perhaps do a query in a loop for x times; if it fails all 5 times (or whatever) I could then simply exit and display the alert. I don?t think I?d need a 2nd machine though? > > B > > >> On Jan 12, 2016, at 4:22 PM, Jonathan Schwartz > wrote: >> >> Bob, >> >> Repeating my suggestion from yesterday?a sick WPE can?t tell you it?s sick. It just doesn?t respond. So rather than trying to make that work, consider the approach I suggested: >> 1) Poll the machines at some regular interval, looking for a known WPE result. Record the timestamp in a separate server. >> 2) In a separate script, examine the length of time elapsed since the most recent polling timestamp. If it exceeds the interval, you can conclude that WPE has not responded on the target server. So, lack of a timely response is your foolproof detection mechanism. >> >> I had this running on a 10 minute interval on a very busy e-commerce website. Worked like a charm. >> >> Hope that helps. >> >> Jonathan >> >> Jonathan Schwartz >> jonathan@exit445.com >> >> >> >>> On Jan 12, 2016, at 2:01 PM, Bob Patin > wrote: >>> >>> But do you get anything back if WPE is off? THat?s where I can?t seem to find a workable solution; it polls the machines just fine, but if the WPE is off, nothing gets returned and my script stalls out on the errant machine? >>> >>> Bob Patin >>> Longterm Solutions >>> bob@longtermsolutions.com >>> 615-333-6858 >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>> http://www.longtermsolutions.com >>> - >>> iChat: bobpatin@me.com >>> Twitter: bobpatin >>> ? >>> FileMaker Consulting >>> FileMaker Hosting for all versions of FileMaker >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>> >>>> On Jan 12, 2016, at 3:53 PM, Tim 'Webko' Booth > wrote: >>>> >>>> That simply checks if there is any response on Port 80 - and I nicked that from somewhere else a long time ago... >>>> >>>> As the WPE machines in my setups are the ones using Port 80, it seems fairly reliable to me. >>>> >>>> Cheers >>>> >>>> Webko >>>> >>>> On 13 January 2016 at 08:19, Bob Patin > wrote: >>>> That first bit looks like what I have, so you must have been the kind donor? :) >>>> >>>> Question about your script: if the WPE is totally down, do you get anything back? Using this line >>>> >>>>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) >>>> >>>> I get an error message sometimes, but more often than not I get nothing back at all. >>>> >>>> B >>>> >>>> Bob Patin >>>> Longterm Solutions >>>> bob@longtermsolutions.com >>>> 615-333-6858 >>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>> http://www.longtermsolutions.com >>>> - >>>> iChat: bobpatin@me.com >>>> Twitter: bobpatin >>>> ? >>>> FileMaker Consulting >>>> FileMaker Hosting for all versions of FileMaker >>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>> >>>> >>>> >>>>> On Jan 12, 2016, at 3:15 PM, Tim 'Webko' Booth > wrote: >>>>> >>>>> The one I generally use just for testing the first place (so could be adapted to do other things if used on a cronjob or similar): >>>>> >>>>> >>>> >>>>> include_once('include/db_config.php'); // DataBase Configuration File. >>>>> include_once('include/FX/FX.php'); // FX.php file >>>>> >>>>> >>>>> //Simple server tests >>>>> $_SESSION['serverError'] = ""; // reset server error >>>>> //Check if Port 80 works at all >>>>> if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) ) { >>>>> $_SESSION['serverError'] = "Server not up"; >>>>> } else { >>>>> //Check -dbnames >>>>> /* $pageObj = new FX($dbHost,$port,$dbType,$conType); >>>>> $pageData = $pageObj->DoFXAction('view_database_names');*/ >>>>> //Check if a findany to an available table works >>>>> $pageObj=new FX($dbHost,$port,$dbType,$conType); >>>>> $pageObj -> setDBPassword($dbPass,$dbUser); >>>>> $pageObj -> setDBData($dbName,'LAYOUT', 'all'); >>>>> $pageData = $pageObj -> FMFindAny(); >>>>> if (FX::isError($pageData)) { >>>>> echo $pageData->getMessage(); >>>>> echo "
"; >>>>> var_dump($pageData); >>>>> } >>>>> elseif ($pageData[?errorCode?] != 0) { >>>>> $_SESSION['serverError'] = $pageData['errorCode']; >>>>> echo "A FileMaker error occurred ({$pageData[?errorCode?]})"; >>>>> } >>>>> else { >>>>> var_dump($pageData); >>>>> echo "All is well"; >>>>> } >>>>> >>>>> } >>>>> if ($_SESSION['serverError'] != "0") { >>>>> echo "Error: ".$_SESSION['serverError']; >>>>> } >>>>> ?> >>>>> >>>>> On 13 January 2016 at 06:17, Bob Patin > wrote: >>>>> Well? here?s what I?m doing?maybe you can tell me where my error is. >>>>> >>>>> I have a page that checks all of my FM Servers to see that the WPE is up; it reloads the page every 4 minutes: >>>>> >>>>> After my query I?m running this (I forget who gave this to me): >>>>> >>>>> // is server up? >>>>> if( !fsockopen ($server, 80, $errno, $errstr, 2) ){ >>>>> // does a bunch of page formatting here for the display >>>>> } >>>>> >>>>> I?ll try swapping that out for >>>>> >>>>> if (FX::isError($qResult)){ >>>>> // do stuff >>>>> } >>>>> >>>>> So my question is this: if the WPE is down, FX isn?t going to return anything, is it? SO, assuming I just did a query, returning the results to $qResult, what do I look for to be returned when the WPE doesn?t respond? I always thought that, if WPE is down, nothing gets returned at all? >>>>> >>>>> Last question: is there an advantage to using FX::isError() to something like this: >>>>> >>>>> if ($qResult[?errorCode'] != 0 >>>>> >>>>> ? I think you told me once that FX::isError waits for the query to finish before it is invoked; wouldn?t that be the same thing with my little IF statement above? Is the first method better, or just simpler? >>>>> >>>>> Thanks, >>>>> >>>>> Bob >>>>> >>>>> Bob Patin >>>>> Longterm Solutions >>>>> bob@longtermsolutions.com >>>>> 615-333-6858 >>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>> http://www.longtermsolutions.com >>>>> - >>>>> iChat: bobpatin@me.com >>>>> Twitter: bobpatin >>>>> ? >>>>> FileMaker Consulting >>>>> FileMaker Hosting for all versions of FileMaker >>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>> >>>>> >>>>> >>>>>> On Jan 12, 2016, at 11:10 AM, Chris Hansen wrote: >>>>>> >>>>>> Hey Bob, >>>>>> >>>>>> Glad to hear you got that figured out. >>>>>> >>>>>> As for knowing when the WPE is down, if you're checking FX::isError() -- and if you're using FX you should be -- that should give you some indication, since there should be an error from attempting to connect to the server. Additionally, I seem to recall that others on the list have posted methods that they use to check server health; could some of them chime in here? >>>>>> >>>>>> Best, >>>>>> >>>>>> --Chris >>>>>> >>>>>>> On Jan 12, 2016, at 7:30 AM, Bob Patin > wrote: >>>>>>> >>>>>>> Chris, >>>>>>> >>>>>>> I finally found the issue; the client had provided an incorrect server address. >>>>>>> >>>>>>> So, and I think I?ve asked this before, do you have a way that, if an FX query fails because the WPE is down, that it?ll return an error? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Bob Patin >>>>>>> Longterm Solutions >>>>>>> bob@longtermsolutions.com >>>>>>> 615-333-6858 >>>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>>> http://www.longtermsolutions.com >>>>>>> - >>>>>>> iChat: bobpatin@me.com >>>>>>> Twitter: bobpatin >>>>>>> ? >>>>>>> FileMaker Consulting >>>>>>> FileMaker Hosting for all versions of FileMaker >>>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>>> >>>>>>>> On Jan 11, 2016, at 10:22 PM, Chris Hansen wrote: >>>>>>>> >>>>>>>> Bob, >>>>>>>> >>>>>>>> Usually when you see that error, it means that somehow an action (like FMFind) was never reached in the code. Is there something in your code that could be stopping things before you get to the final call, or did you omit one? >>>>>>>> >>>>>>>> Best, >>>>>>>> >>>>>>>> --Chris >>>>>>>> >>>>>>>>> On Jan 11, 2016, at 1:45 PM, Bob Patin > wrote: >>>>>>>>> >>>>>>>>> Does this indicate that FX is failing to communicate w/ the Filemaker Server? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> Bob Patin >>>>>>>>> Longterm Solutions >>>>>>>>> bob@longtermsolutions.com >>>>>>>>> 615-333-6858 >>>>>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer >>>>>>>>> http://www.longtermsolutions.com >>>>>>>>> - >>>>>>>>> iChat: bobpatin@me.com >>>>>>>>> Twitter: bobpatin >>>>>>>>> ? >>>>>>>>> FileMaker Consulting >>>>>>>>> FileMaker Hosting for all versions of FileMaker >>>>>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> FX.php_List mailing list >>>>>>>>> FX.php_List@mail.iviking.org >>>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> FX.php_List mailing list >>>>>>>> FX.php_List@mail.iviking.org >>>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>>> >>>>>>> _______________________________________________ >>>>>>> FX.php_List mailing list >>>>>>> FX.php_List@mail.iviking.org >>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>>> >>>>>> _______________________________________________ >>>>>> FX.php_List mailing list >>>>>> FX.php_List@mail.iviking.org >>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>> >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>>> >>>>> >>>>> _______________________________________________ >>>>> FX.php_List mailing list >>>>> FX.php_List@mail.iviking.org >>>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>>> >>>> >>>> _______________________________________________ >>>> FX.php_List mailing list >>>> FX.php_List@mail.iviking.org >>>> http://www.iviking.org/mailman/listinfo/fx.php_list >>> >>> _______________________________________________ >>> FX.php_List mailing list >>> FX.php_List@mail.iviking.org >>> http://www.iviking.org/mailman/listinfo/fx.php_list >> >> _______________________________________________ >> FX.php_List mailing list >> FX.php_List@mail.iviking.org >> http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list > > > _______________________________________________ > FX.php_List mailing list > FX.php_List@mail.iviking.org > http://www.iviking.org/mailman/listinfo/fx.php_list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20160112/7bde2a61/attachment-0001.html