[FX.php List] foundcount: -1
Alex Gates
alex at gandrpublishing.com
Fri Apr 6 08:49:22 MDT 2007
Let me back up a bit:
I wanted to install FileMaker Server 8 Advanced on my local machine
because our IT guy was having problems getting it reinstalled on a
server that crashed - He has it installed, but for some reason he can't
seem to get it configured. He says it's because the server is also a
domain controller.
I'm not sure - but I decided that I should just try to get it on my
machine so I can keep working on my project.
Ideally, it would be nice to have it back on that server where it was
before - and even though he has called FileMaker about the issue a few
times, he is still unable to get things going. He has service pack 2 on
Server 2003 - and he claims that could also be the issue.
At any rate, I wanted to get it up and running on my machine.
I realized now that using 'localhost' as my server address is trying to
reach 'localhost' on the server - since I am saving the file on that
server because that is where PHP is installed and I do my testing - so,
it's actually the server that is giving me the foundcount of -1 and the
"No Action Taken" with the webCompanionPort of 80. - Apparently the Web
Publishing Engine is set on port 8080 on that machine (he claims that
8080 is the only port that would work for the web publishing engine) -
and when I use 'localhost' with 8080, I get an 802 (Unable to Open
File). -
I know I'm getting 'unable to open file' because the fmi/config web
publishing engine configuration on the server is not making the
connection to FileMaker Server. I had him try changing the passphrase -
and I watched him to it to ensure it was right - but it just doesn't
make the connection.
It's frustrating because he said he's "tried everything and it just wont
work." I'd like to boot him out of his chair and do it myself, but
alas, it's not my place.
So, I need to take matters in my own hand - I have FileMaker Server 8
running and the Web Publishing Engine configured on my local machine.
So, I've changed my serverdata file to this:
$serverIP = '10.0.0.23';
$webCompanionPort = 80; // for FM7SA, this should we the web
server port
$dataSourceType = 'FMPro7';
$webUN = 'Admin'; // defaults for Book_List in FM7; both
should be blank for Book_List in FM5/6
$webPW = 'admin';
if (strtolower($dataSourceType) == 'fmpro7') {
$bookListFile = 'Book_List.fp7';
} else {
$bookListFile = 'Book_List.fp5';
}
$scheme = 'http'; // generally this will be 'http';
'https' for SSL connections to FileMaker
and using this query:
<?php
include_once('FX/FX.php');
include_once('FX/server_data.php');
include_once('FX/FX_Error.php');
?>
<?php
$accountfind=new FX($serverIP, $webCompanionPort, 'FMPro7');
$accountfind->SetDBData('Web_Cookbook_Dev2.fp7','Login');
$accountfind->SetDBPassword('admin','admin');
$accountfindResult=$accountfind->FMFindAny();
print_r($accountfindResult);
echo "foundcount: ".$accountfindResult['foundCount'];
?>
I get the FX Error Object returned:
FX_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024
[code] => 100 [message] => FX: cURL could not retrieve Post data in
RetrieveFM7Data(). A bad URL is the most likely reason.
Interestingly, when I take the DataURL from the Error Object
([dataURL] =>
http://xxxxx:xxxxx@10.0.0.23:80/fmi/xml/FMPXMLRESULT.xml?-db=Web_Cookboo
k_Dev2.fp7&-lay=Login&-max=50&-findany) and paste it in my browser, I
get the raw XML returned with data from one record.
This proves that the web publishing engine is working on my local
machine, right?
My php pages are on the same server that isn't configured correctly, but
I'm trying to get data from FileMaker server and web publishing engine
that I have on my local machine.
I'm about two minutes away from installing php on my local machine so I
can get completely off that server... but I'm not sure if that is what
is causing the error or not - since it worked perfectly fine to get data
from FileMaker Server / Web Publishing Engine off a laptop that wasn't
on the domain.
How can I get "cURL could not retrieve Post data in RetrieveFM7Data(). A
bad URL is the most likely reason." With the FX Object, but when I copy
and paste the dataURL I get the raw XML?
I know this is a learning experience - but it's awfully frustrating when
I have better things to be doing.
Any help would be greatly appreciated.
Alex
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Chris Hansen
Sent: Friday, April 06, 2007 8:45 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] foundcount: -1
Alex,
Could we look at the query code? The "No Action Taken" makes it
sound like something isn't right. Best,
--Chris Hansen
FileMaker 8 Certified Developer
FileMaker 7 Certified Developer
Creator of FX.php
"The best way from FileMaker to the Web."
www.iViking.org
On Apr 6, 2007, at 7:09 AM, Alex Gates wrote:
> Hi everyone:
>
> I'm trying my hand at installing FileMaker Server 8 advanced using IIS
> on XP Pro.
>
> Have any of you ever gotten a foundcount of -1 on a simple query test
> using fx.php?
>
> Here is my returned array:
>
> Array ( [data] => Array ( ) [linkNext] => [linkPrevious] =>
> [foundCount]
> => -1 [fields] => Array ( ) [URL] =>
> http://****:****@localhost:80/fmi/xml/FMPXMLRESULT.xml?-
> db=Web_Cookbook_
> Dev2.fp7&-lay=Login&-max=50&-findany [query] => [errorCode] => No
> Action
> Taken [valueLists] => Array ( ) ) foundcount: -1
>
> Any suggestions?
>
> Alex
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Gjermund
> Gusland Thorsen
> Sent: Thursday, April 05, 2007 5:09 PM
> To: adenman at tmea.org; FX.php Discussion List
> Subject: Re: [FX.php List] New to FX: A few basic questions
>
> If you need OLAP features you have to use layouts as cubes.
>
> ggt667
>
> On 4/5/07, Andrew Denman <adenman at tmea.org> wrote:
>> 2. Is data entry FM session based or transaction based?
>>
>> If you're asking the question I think you are, the answer is that it
> is
>> transaction based. Each find, add, edit, and delete you make through
> FX.php
>> is completely separate from each other.
>>
>> Andrew Denman
>> TMEA IT Administrator
>> 1-888-318-TMEA x109
>> Fax: (512) 451-9213
>> www.tmea.org
>>
>> -----Original Message-----
>> From: fx.php_list-bounces at mail.iviking.org
>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Vision
> Computer
>> Consulting
>> Sent: Thursday, April 05, 2007 1:19 AM
>> To: FX.php Discussion List
>> Subject: Re: [FX.php List] New to FX: A few basic questions
>>
>> Excuse me. I left something out of the question. I meant to say:
>>
>>> I have worked extensively with PHP session variables and yes they
>>> work great. Are you talking about PHP sessions and not FMP sessions?
>> Doesn't the add,update, delete look like a transaction to FM even
>> when it is done within a PHP session?
>>
>>
>> On Apr 4, 2007, at 11:09 PM, Vision Computer Consulting wrote:
>>
>>> I have worked with extensively with PHP session variables. Are you
>>> talking about PHP sessions and FMP sessions?
>>>
>>> On Apr 4, 2007, at 7:31 PM, Bob Patin wrote:
>>>
>>>> I second others' advice not to use scripts if at all possible with
>>>> PHP. So far I've been able to do some fairly complex things with
>>>> PHP without any scripting; between the wealth of PHP scripts and
>>>> functions available on the web, and PHP's flexibility when
>>>> compared to CDML or Lasso, I think you'll quickly find it to be
>>>> much easier to work with.
>>>>
>>>> Look into session variables; they're immensely valuable and very
>>>> easy to use; not having to deal with tokens as I did with CDML was
>>>> such a relief!
>>>>
>>>> Have fun!
>>>>
>>>> Bob Patin
>>>> Longterm Solutions
>>>> bob at longtermsolutions.com
>>>> 615-333-6858
>>>> http://www.longtermsolutions.com
>>>>
>>>> CONTACT US VIA INSTANT MESSAGING:
>>>> AIM or iChat: longterm1954
>>>> Yahoo: longterm_solutions
>>>> MSN: tech at longtermsolutions.com
>>>> ICQ: 159333060
>>>>
>>>>
>>>> On Apr 4, 2007, at 8:11 PM, Vision Computer Consulting wrote:
>>>>
>>>>> Thank you Kevin and Alex for your help.
>>>>>
>>>>> Here is a link to FM error codes,
>>>>> http://www.briandunning.com/error-codes/?source=FileMaker
>>>>>
>>>>> Stephen Calia
>>>>> Vision Computer Consulting
>>>>> info at visioncomputerconsulting.com
>>>>>
>>>>>
>>>>> On Apr 4, 2007, at 5:49 PM, Kevin Futter wrote:
>>>>>
>>>>>> On 5/4/07 10:09 AM, "Alex Gates" <alex at gandrpublishing.com>
> wrote:
>>>>>>
>>>>>>> Hi Stephen-
>>>>>>>
>>>>>>> I can only help with one of your questions as I'm relatively
>>>>>>> new to this
>>>>>>> as well.
>>>>>>>
>>>>>>> The answer to 1 is yes. The field that you are retrieving data
>>>>>>> from has
>>>>>>> to be on the layout you specify.
>>>>>>>
>>>>>>> Sorry I can't help with anything else -
>>>>>>>
>>>>>>> Alex
>>>>>>>
>>>>>>> Vision Computer Consulting wrote:
>>>>>>>> 1. I was a lasso programmer who has been doing PHP/MySQL for
>>>>>>>> the last 4
>>>>>>>> years, but I remember that we created a layout that had all
>>>>>>>> fields on it
>>>>>>>> to make them accessible to lasso. What I have noticed is that,
>>>>>>>> unless
>>>>>>>> the related field is on the layout you are accessing, data in
>>>>>>>> that field
>>>>>>>> can't be retrieved. I know that in recent versions of
>>>>>>>> Filemaker one can
>>>>>>>> grab data from many layers of related layouts.
>>>>>>>>
>>>>>>>> That is a long way of asking whether the field you are
>>>>>>>> retrieving data
>>>>>>>> from has to be on the layout you specify in SetDBData?
>>>>>>>>
>>>>>>>> 2. Is data entry FM session based or transaction based?
>>>>>>>>
>>>>>>>> 3. I am using PHP to do data validation (especially date and
>>>>>>>> time). Any
>>>>>>>> hints on how to format date and time in such a way that FM
>>>>>>>> won't throw
>>>>>>>> and error? How do I setup Filemaker to best accept date and
> time
>>>>>>>> information?
>>>>>>>>
>>>>>>>> 4. Is it a good idea to run FM scripts from FX? If so, any
>>>>>>>> suggestions
>>>>>>>> on when it might appropriate to use FX to run an FM script?
>>>>>>>>
>>>>>>>> Thank you in advance for your help.
>>>>>>>>
>>>>>>>> Stephen Calia
>>>>>>
>>>>>> 1. Alex is right - all fields (and value lists) you need must be
>>>>>> on the
>>>>>> layout you specify.
>>>>>>
>>>>>> 2. I'm not sure - I assume it's transacted-based, but that's
>>>>>> just an
>>>>>> educated guess.
>>>>>>
>>>>>> 3. Normally FM accepts dates separated only by periods (.) or
>>>>>> forward-slashes (/). IIRC, anything else is invalid for a
>>>>>> FileMaker date -
>>>>>> off the top of my head mind. Your safest be is just to make sure
>>>>>> that any
>>>>>> dates you submit to FM are formatted that way. Remember,
>>>>>> everything you pass
>>>>>> to FM (or *any* database) via the web is a string, FM makes it
>>>>>> into whatever
>>>>>> data type is specified by the target field definition, as long
>>>>>> as it
>>>>>> qualifies.
>>>>>>
>>>>>> 4. No, it's best to avoid running internal FM scripts from the
>>>>>> web, for a
>>>>>> variety of reasons - they can compromise security, there can be
>>>>>> data sync
>>>>>> issues, they can be expensive server-side and slow down the
>>>>>> transaction
>>>>>> queue, etc. I've done it, but only as a last resort.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Kevin Futter
>>>>>> Webmaster, St. Bernard's College
>>>>>> http://www.sbc.melb.catholic.edu.au/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
> ###################################################################
>>>>>> ##################
>>>>>> This e-mail message has been scanned for Viruses and Content and
>>>>>> cleared
>>>>>> by MailMarshal
>>>>>>
> ###################################################################
>>>>>> ##################
>>>>>>
>>>>>> This e-mail and any attachments may be confidential. You must
>>>>>> not disclose or use the information in this e-mail if you are
>>>>>> not the intended recipient. If you have received this e-mail in
>>>>>> error, please notify us immediately and delete the e-mail and
>>>>>> all copies. The College does not guarantee that this e-mail is
>>>>>> virus or error free. The attached files are provided and may
>>>>>> only be used on the basis that the user assumes all
>>>>>> responsibility for any loss, damage or consequence resulting
>>>>>> directly or indirectly from the use of the attached files,
>>>>>> whether caused by the negligence of the sender or not. The
>>>>>> content and opinions in this e-mail are not necessarily those of
>>>>>> the College.
>>>>>>
>>>>>> _______________________________________________
>>>>>> FX.php_List mailing list
>>>>>> FX.php_List at mail.iviking.org
>>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> FX.php_List mailing list
>>>>> FX.php_List at mail.iviking.org
>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list