[FX.php List] How do I specify https when I instantiate of the
FXobject?
jason f. boldt
jason_fb at beezwax.net
Tue Mar 6 10:53:48 MST 2007
Andrew,
Ah ha... I must be using an older FX version which does not have the
same documentation.
The FX I am using has a header in the FX.php file of
<?php
#### FX.php
#############################################################
#
#
# By: Chris Hansen with Chris Adams, Gjermund Thorsen, and
others #
# Date: 25 Jan
2004 #
# Web Site:
www.iviking.org #
# Details: FX is a free open-source PHP class for accessing
FileMaker #
# data. For complete details about this class, please
visit #
#
www.iviking.org. #
#
#
########################################################################
#
But then I downloaded the zip file from the site... and it has a
different header.....
<?php
#### FX.php
#############################################################
#
#
# By: Chris Hansen with Chris Adams, Gjermund Thorsen, and
others #
# Version:
4.2 #
# Date: 03 Nov
2005 #
# Web Site:
www.iviking.org #
# Details: FX is a free open-source PHP class for accessing
FileMaker #
# data. For complete details about this class, please
visit #
#
www.iviking.org. #
#
#
########################################################################
#
So it must be that I am using an older version of FX that does not
support https. This would explain why I couldn't find it in the manual.
Will upgrade FX now....
-Jason
On Mar 6, 2007, at 8:27 AM, Andrew Denman wrote:
> My FX.php documentation has this as the FX function:
>
> FX($dataServer, $dataPort, $dataType, $dataURLType)
> $dataServer = IP address
> $dataPort = Port Number
> $dataType = Database Type (FMPro7)
> $dataURLType = HTTP or HTTPS
>
> Andrew Denman
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of jason f.
> boldt
> Sent: Tuesday, March 06, 2007 10:06 AM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] How do I specify https when I
> instantiate of the
> FXobject?
>
> GGT667,
> Actually I already have the server_data.php file in my site (I've
> renamed it to fm_server_data.php, but same content). Here's my
> fm_server_data.php:
>
> <?php
> /********************************************************************
> * This file is where you set the data related to your server. In *
> * order to get these FX.php examples to work on your system, you *
> * need to set $serverIP to the IP address of your server. Also, *
> * be sure to set $webCompanionPort to match the port configured *
> * for Web Companion on your FileMaker Pro Unlimited machine. *
> ********************************************************************/
>
> $serverIP = 'localhost';
> $webCompanionPort = 443; // for FM7SA, this should we the web
> server port
> $dataSourceType = 'FMPro7';
>
>
> $scheme = 'https'; // generally this will be 'http';
> 'https' for SSL connections to FileMaker
>
>
>
> $fm_dbuser = "webbot";
> $fm_dbpass = "******";
> ?>
>
>
> Now, as you can see, I've already tried setting this PHP variable
> $scheme. The reason I asked the list "How do I specify https when I
> instantiate of the FX object", is because when I instantiate the FX
> object, $serverIP, $webCompanionPort, and $dataSourceType are all
> variables passed to the new FX() function:
>
> $directqry = new FX($serverIP, $webCompanionPort, $dataSourceType);
>
> But what I've noticed is that there's not place where $scheme gets
> passed to the FX class. In the server_data.php file, as you have
> said, is a configuration variable, but this config variable doesn't
> get passed to the class anywhere. Even with the code above (setting
> $scheme to 'https'), I'm still getting [dataURL] => http:// which is
> clearly wrong.
>
> I've been back and forth over the documentation and the only mention
> of how to do this is to change the port to 443-- which I can see it
> is trying to do, but the protocol in the URL is still http:// so it
> is failing.
>
> Please help, the sample config file that you point me to and the
> documentation do not answer this question (unless I couldn't find
> them somewhere, but I looked pretty hard and searched for 'ssl' in
> FXFunctions.pdf)
>
> Thanks,
> Jason
>
>
>
>
>
>
>
> On Mar 5, 2007, at 10:45 PM, Gjermund Gusland Thorsen wrote:
>
>> Take a look in FX/server_data.php
>>
>> It will show you.
>>
>> ggt667
>>
>> On 3/6/07, jason f. boldt <jason_fb at beezwax.net> wrote:
>>> FX PHP List,
>>> I'm having trouble getting the class to work with an HTTPS server.
>>> I have
>>> examined my fx Object and found that it has an attribute for
>>> dataURL that is
>>> indeed wrong:
>>>
>>> [dataURL] =>
>>> http://webbot:******@localhost:443/fmi/xml/FMPXMLRESULT.xml?-db=
>>>
>>>
>>> I have obscured the password, but other than that this is what I
>>> see in my
>>> FX Object when I print it out for debugging. As you can see, the
>>> port 443
>>> comes through at the end of localhost: but the URL is for http://
>>>
>>> this is clearly wrong (and probably why code is returning
>>> [message] =>
>>> FX: ExecuteQuery XML error: syntax error at line 1 ) because I
>>> know my
>>> server is operating at https having confirmed this in the browser.
>>>
>>> Here's my code.... with passwords obscured....
>>>
>>> <?php
>>> $serverIP = 'localhost';
>>> $webCompanionPort = 443; // for FM7SA, this should we the
>>> web server
>>> port
>>> $dataSourceType = 'FMPro7';
>>>
>>> $directqry = new FX($serverIP, $webCompanionPort, $dataSourceType);
>>> $directqry->SetDBUserPass($fm_dbuser,$fm_dbpass );
>>> $directqry->SetDBData("****","****", 1);
>>> $data = $directqry->FMFind();
>>> $dataObj = $data['data'];
>>>
>>> print "<PRE>";
>>> print_r($directqry);
>>>
>>> print "</PRE>";
>>>
>>> ?>
>>>
>>> How do I specify https when I instantiate of the FX object?
>>>
>>> Thanks,
>>> Jason
>>>
>>>
>>> --
>>>
>>> jason f. boldt
>>> jason_fb at beezwax.net
>>> beezwax datatools inc
>>> (510) 835-4483 x 104
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>
>
> --
>
> jason f. boldt
> jason_fb at beezwax.net
> beezwax datatools inc
> (510) 835-4483 x 104
>
>
> _______________________________________________
> 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
>
--
jason f. boldt
jason_fb at beezwax.net
beezwax datatools inc
(510) 835-4483 x 104
More information about the FX.php_List
mailing list