[FX.php List] How do I specify https when I instantiate of the FX object?

jason f. boldt jason_fb at beezwax.net
Tue Mar 6 09:05:48 MST 2007


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




More information about the FX.php_List mailing list